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: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