Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- algoritmo "4_12"
- declare x, y, i, mdc: inteiro;
- escreva("Informe o valor do primeiro número: ");
- leia(x);
- escreva("Informe o valor do segundo número: ");
- leia(y);
- para (i <- 1; i <=x; i<-i+1) faca
- se ((resto(x, i)==0) E (resto(y, i)==0)) entao
- mdc <- i;
- fimse
- fimpara
- escreva(mdc);
- fimalgoritmo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement