Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- yiato
- Date:
- 2020-04-03
- Revision:
- 2:976e71d7270c
- Parent:
- 1:0b9be892ceaf
- Child:
- 3:ba0abccd66c0
File content as of revision 2:976e71d7270c:
#include "mbed.h"
//programa que genera una función con argumentos y con retorno de valor
Serial com1(USBTX, USBRX);
int sum(int a, int b); //declaración de funcion
int main()
{
int a=5, b=10, z;
z=sum(a, b);
com1.printf("El resultado es: %d",sum(a,b));
sum(a,b);
}
int sum(int a, int b)
{
return (a+b);
}