Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- algoritmo "4_2"
- declare n, f, i:inteiro;
- escreva("Informe o valor de n: ");
- leia(n);
- i <- 1;
- f <- 0;
- enquanto (i <= n) faca
- se (f =- 0) entao
- escreval(i, "..");
- i <- i + 1;
- fimse
- se (f != 0) entao
- escreval(i, "..");
- i <- i + 2;
- fimse
- f <- f + 1;
- fimenquanto
- fimalgoritmo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement