Advertisement
Guest User

Untitled

a guest
Oct 9th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int a,b;
  7.  
  8. cin>>a>>b;
  9. while(a!=b)
  10. {
  11. if(a>b)a-=b;
  12. else b-=a;
  13. }
  14. cout<<a<<endl;
  15.  
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement