Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main() {
- int a, b, mcd;
- printf("Inserisci a: ");
- scanf("%d", &a);
- printf("Inserisci b: ");
- scanf("%d", &b);
- while (a!=b){
- if(a>b){
- a -=b;
- } else{
- b-=a;
- }
- }
- mcd = a;
- printf("mcd vale : %d", mcd);
- system("PAUSE");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement