Jair Valdovinos / Mbed 2 deprecated P5_E2

Dependencies:   mbed FXOS8700Q

Revision:
0:a9edb328dd9c
Child:
1:b6b079534178
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Apr 11 01:43:48 2020 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+#include <stdio.h>
+#include <iostream>
+#include <math.h>
+
+Serial com1(USBTX, USBRX);
+
+int potencia(void);
+
+    
+int main()
+{
+    while(1){
+    int resultado;
+    resultado = potencia();
+    com1.printf("El numero elevado a la 10 es: %d \n",resultado);
+    }
+}
+
+int potencia(void)
+{
+  while(1){
+  int t, b;
+  com1.printf( "Escriba un número: " ); scanf( "%i", &t );
+  b = t*t*t*t*t*t*t*t*t*t;
+  return b;
+    }
+}
\ No newline at end of file