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