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
- Committer:
- thesad
- Date:
- 2020-04-15
- Revision:
- 1:b6b079534178
- Parent:
- 0:a9edb328dd9c
File content as of revision 1:b6b079534178:
#include "mbed.h"
#include <stdio.h>
#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: " ); com1.scanf( "%i", &t );
b = t*t*t*t*t*t*t*t*t*t;
return b;
}
}