Created
April 21, 2015 23:31
-
-
Save rogerioagjr/f75aeefc3897efbf1921 to your computer and use it in GitHub Desktop.
Até 10
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 <cstdio> | |
int main(){ | |
int n=1; // declaro a variável n começando com o valor 1 | |
while(n<=10){ // enquanto n for menor ou igual a 10 | |
printf("%d ", n); // imprima o valor de n e um espaço | |
n++; // e adicione 1 ao seu valor | |
} | |
printf("\n"); // imprima a quebra de linha | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment