daily pastebin goal
6%
SHARE
TWEET

4_22

a guest Sep 9th, 2018 152 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. algoritmo "4_22"
  2.       n, i, t, aux, x,f:inteiro;
  3.       escreva("Informe um nĂºmero inteiro: ");
  4.       leia(n);
  5.       x <- 1;
  6.       f <- 1;
  7.       enquanto (x <= n) faca
  8.                aux <- f;
  9.                i <- 1;
  10.                t <- 0;
  11.                enquanto (i <= f) faca
  12.                         se ((resto(f, i) == 0) E (i != aux)) entao
  13.                         t <- t + i;
  14.                         fimse
  15.                         i <- i + 1;
  16.                fimenquanto
  17.                se (t == f) entao
  18.                   escreval(t);
  19.                fimse
  20.                x <- x + 1;
  21.                f <- f + 1;
  22.       fimenquanto
  23. 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