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.
main.cpp
00001 #include "mbed.h" 00002 #include <stdio.h> 00003 #include <math.h> 00004 00005 Serial com1(USBTX, USBRX); 00006 00007 int potencia(void); 00008 00009 00010 int main() 00011 { 00012 while(1){ 00013 int resultado; 00014 resultado = potencia(); 00015 com1.printf("El numero elevado a la 10 es: %d \n",resultado); 00016 } 00017 } 00018 00019 int potencia(void) 00020 { 00021 while(1){ 00022 int t, b; 00023 com1.printf( "Escriba un número: " ); com1.scanf( "%i", &t ); 00024 b = t*t*t*t*t*t*t*t*t*t; 00025 return b; 00026 } 00027 }
Generated on Sun Jul 17 2022 08:17:49 by
1.7.2