#include <iostream>
using namespace std;
int gcd(int a,int b){
return 0==b?a:gcd(b,a%b);
}
int main()
{
freopen("C:\\in.txt","r",stdin);
printf("%d\n",gcd(2,5));
printf("%d\n",gcd(12,3));
printf("%d\n",gcd(8,14));
return 0;
}
#include <iostream>
using namespace std;
int gcd(int a,int b){
return 0==b?a:gcd(b,a%b);
}
int main()
{
freopen("C:\\in.txt","r",stdin);
printf("%d\n",gcd(2,5));
printf("%d\n",gcd(12,3));
printf("%d\n",gcd(8,14));
return 0;
}