Advertisement
Guest User

4_12

a guest
Aug 26th, 2018
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. algoritmo "4_12"
  2.       declare x, y, i, mdc: inteiro;
  3.       escreva("Informe o valor do primeiro número: ");
  4.       leia(x);
  5.       escreva("Informe o valor do segundo número: ");
  6.       leia(y);
  7.       para (i <- 1; i <=x; i<-i+1) faca
  8.            se ((resto(x, i)==0) E (resto(y, i)==0)) entao
  9.               mdc <- i;
  10.            fimse
  11.       fimpara
  12.       escreva(mdc);
  13. fimalgoritmo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement