Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- algoritmo "4_19"
- declare aux, aux2, n, i:inteiro;
- escreva("Informe um número inteiro: ");
- leia(n);
- i <- 1;
- aux <- n;
- aux2 <- n - 1;
- se ((n == 0) OU (n == 1)) entao
- escreval("1");
- senao
- enquanto (i < n) faca
- aux <- aux * aux2;
- aux2 <- aux2 - 1;
- i <- i + 1;
- fimenquanto
- escreval(aux);
- fimse
- fimalgoritmo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement