Advertisement
Guest User

4_19

a guest
Sep 9th, 2018
367
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. algoritmo "4_19"
  2.  
  3.       declare aux, aux2, n, i:inteiro;
  4.       escreva("Informe um número inteiro: ");
  5.       leia(n);
  6.       i <- 1;
  7.       aux <- n;
  8.       aux2 <- n - 1;
  9.       se ((n == 0) OU (n == 1)) entao
  10.          escreval("1");
  11.       senao
  12.            enquanto (i < n) faca
  13.                     aux <- aux * aux2;
  14.                     aux2 <- aux2 - 1;
  15.                     i <- i + 1;
  16.            fimenquanto
  17.            escreval(aux);
  18.       fimse
  19. fimalgoritmo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement