Advertisement
campos20

Repetição, incremento

May 4th, 2020
1,628
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.36 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. //
  5. // Autor: Alexandre Campos
  6.  
  7. int main()
  8. {
  9.     // Declaracao
  10.     int contador = 0;
  11.  
  12.     // Logica e exibicao
  13.     while (contador <= 9){
  14.         // Exibicao do valor atual
  15.         printf("Valor atual: %d\n", contador);
  16.  
  17.         // Incremento
  18.         contador++;
  19.     }
  20.  
  21.     // Saida com sucesso
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement