Created
May 14, 2016 08:54
-
-
Save cthbst/7d95df5d1a9709dce9f2dd021ac5b7f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
using namespace std ; | |
int gcd(int a ,int b ){ | |
if (b==0)return a ; | |
return gcd(b,a%b) ; | |
} | |
int main(){ | |
int a ,b ; | |
while (cin >> a >> b ){ | |
cout << gcd(a,b) <<endl ; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment