daily pastebin goal
32%
SHARE
TWEET

4_24

a guest Sep 10th, 2018 147 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. algoritmo "4_24"
  2.       declare n, d, i:inteiro;
  3.       escreva("Informe um nĂºmero inteiro: ");
  4.       leia(n);
  5.       i <- 1;
  6.       d <- 0;
  7.       se (n == 2) entao
  8.          escreval("Primo" );
  9.       senao
  10.            se (resto(n, 2) != 0) entao
  11.               enquanto (i <= n) faca
  12.                        se (resto(n, i) == 0) entao
  13.                           d <- d + 1;
  14.                        fimse
  15.                        i <- i + 1;
  16.               fimenquanto
  17.               se (d == 2) entao
  18.                  escreval("Primo");
  19.               fimse
  20.            fimse
  21.       fimse
  22. fimalgoritmo
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top