Alberto Garcia / Mbed 2 deprecated ejemplo_4

Dependencies:   mbed FXOS8700Q

Files at this revision

API Documentation at this revision

Comitter:
yiato
Date:
Fri Apr 03 19:34:28 2020 +0000
Parent:
0:f8d824abdf66
Commit message:
ejemplo 2

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Apr 03 06:02:07 2020 +0000
+++ b/main.cpp	Fri Apr 03 19:34:28 2020 +0000
@@ -14,8 +14,14 @@
      
 int suma(int a, int b)
 {
-  int suma;
-  suma= a + b ;
-  com1.printf("la suma es igual a; \n") ;  
-return (suma);
+    int variable1, variable2, suma; 
+  variable1=10;
+  variable2=4;
+  suma= variable1 + variable2 ;
+  while(1);
+  {
+  com1.printf("la suma es igual a %d \n", suma);
+  wait(1);  
+  }
+  return (suma);
 }