a guest Aug 26th, 2018 155 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
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