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 int main(void) 00003 { 00004 00005 int num1; //Declaración de variable de tipo entero 00006 00007 printf("Introduce un numero: "); //Pedimos un numero de teclado 00008 scanf("%d",&num1); //Guardamos el numero en la variable num1 00009 00010 //Usamos un bucle Do While, para que se ejecute al menos una vez 00011 do{ 00012 00013 printf("%d\n",num1); //Muestra en pantalla el numero introducido y lo decrementa en 1. 00014 num1--; 00015 00016 }while (num1 != 0); //Todo esto lo realiza mientras num1 no sea 0. En el momento que llega a 0, el bucle termina. 00017 00018 system("PAUSE"); 00019 00020 return 0; 00021 }
Generated on Wed Aug 17 2022 05:31:51 by
1.7.2