Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int cmmdc(int a,int b)
- {if(a>b) return a=cmmdc(a-b,b);
- else if(a<b) return a=cmmdc(a,b-a);
- else return a;
- }
- int main()
- {int x,y;
- cin>>x>>y;
- cout<<"cmmdc este "<<cmmdc(x,y);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement