SHARE
TWEET

Untitled

a guest Oct 9th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top