Gustavo Vargas Melo / Mbed 2 deprecated Moy2

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
akumagame
Date:
Sat Apr 11 21:15:27 2020 +0000
Parent:
0:1214493cf1ee
Commit message:
F;

Changed in this revision

FXOS8700Q.lib Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/FXOS8700Q.lib	Fri Apr 10 19:48:27 2020 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://developer.mbed.org/teams/Freescale/code/FXOS8700Q/#aee7dea904e2
--- a/main.cpp	Fri Apr 10 19:48:27 2020 +0000
+++ b/main.cpp	Sat Apr 11 21:15:27 2020 +0000
@@ -1,22 +1,23 @@
 #include "mbed.h" 
-#include "math.h"
+
 
 Serial com1(USBTX, USBRX);
  
-;int exponente()
+int multi()
 {
-    int a;
-    int b=0;
-    printf("ingrese numero que desea elevar a la potencia 10 a:");
-    scanf("%d", &a);
-    b = pow(a, 10);
-    return b;
+    int z;
+    int w;
+    com1.printf("Que valor quiere elevar a:");
+    com1.scanf("%d", &z);
+    w = z*z*z*z*z*z*z*z*z*z;
+    return w;
  } 
  
 int main()
 {
-    printf("ejecutandose Main");
-    cout<<exponente()<<endl;
+    int t;
+    t=multi();
+    com1.printf("El resultado es: %d",t);
 }
 
     
\ No newline at end of file