Created
September 25, 2017 15:23
-
-
Save IanCarloz/665432f7caec68ce062e368c170f143d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
/* | |
La instruccion while se utiliza para generar bucles (ciclos): | |
hasta satisfacer la condicion, un grupo de instrucciones se | |
ejecuta de forma repetida. | |
la forma general es: | |
while(condicion){instrucciones} | |
*/ | |
int main(){ | |
int digito, DigFinal; | |
printf("Dame un valor entero inicial "); | |
scanf("%i",&digito); | |
//digito = digito - 1; | |
printf("Dame un valor entero final "); | |
scanf("%i",&DigFinal); | |
//DigFinal= DigFinal - 1; | |
printf("Ahora te muestro una lista de datos:\n"); | |
while (digito < DigFinal + 1) { | |
printf("%d\n",digito); | |
digito = digito+1; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment