Omar Espinoza / Mbed 2 deprecated Funcion_ejemplo1

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
omarem
Date:
Fri Apr 03 22:44:06 2020 +0000
Parent:
24:7f14b70fc9ef
Commit message:
Sinparametros_conretorno

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Apr 08 11:03:25 2019 +0100
+++ b/main.cpp	Fri Apr 03 22:44:06 2020 +0000
@@ -1,12 +1,20 @@
 #include "mbed.h"
-
-DigitalOut myled(LED1);
+Serial com1(USBTX, USBRX);
 
-int main() {
-    while(1) {
-        myled = 1;
-        wait(0.2);
-        myled = 0;
-        wait(0.2);
+int inverso
+int main{}
+{
+   printf("Los valores inversos de 1, 2, 3, 4 son:");
+   innverso();
+   return 0;
     }
-}
+
+    int inverso{}
+    
+    {
+    int a=1, b=2, c=3, d=4;
+    printf ("%d %d %d %d", d, c, b, a);
+    return inverso;
+    }
+
+