Advertisement
Aluneth

while 31-3-25

Mar 31st, 2025
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.51 KB | None | 0 0
  1. // Estructura repetitiva while (mientras)
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5.  
  6. /* int main()
  7. {
  8.     int numero = 1;
  9.     while (numero <= 100)
  10.     {
  11.         printf("- %d \n", numero);
  12.         numero = numero +1;
  13.     }
  14.     //printf("Hello world!\n");
  15.     return 0;
  16. } */
  17.  
  18.  
  19. /* int main ()
  20. {
  21.     int x, n;
  22.     x = 1;
  23.     printf("Ingrese un numero: ");
  24.     scanf("%d", &n);
  25.  
  26.     while (x<=n)
  27.     {
  28.  
  29.         printf("- %d\n", x);
  30.         x = x+1;
  31.  
  32.     }
  33.  
  34.     return 0;
  35. } */
  36.  
  37. int main () {}
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement