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.
Diff: main.cpp
- Revision:
- 0:f8d824abdf66
- Child:
- 1:0b9be892ceaf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Apr 03 06:02:07 2020 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+
+//programa que genera una función con argumentos y con retorno de valor
+
+Serial com1(USBTX, USBRX);
+
+int suma(int a, int b); //declaración de funcion
+
+
+int main()
+{
+ int suma(int a, int b);
+}
+
+int suma(int a, int b)
+{
+ int suma;
+ suma= a + b ;
+ com1.printf("la suma es igual a; \n") ;
+return (suma);
+}