int gcd(int m,int n)
{
int result=m>n?n:m;
while(m%result || n%result)
{
result--;
}
return result;
}
void main()
{
scanf("%d,%d",&m,&n);
printf("The result is %d !, gcd(m,n));
}
#include
int gcd(int m, int n)
{
int gcd;
gcd=m>n?n:m;
while(m%gcd!=0 || n%gcd!=0)
{
gcd--;
}
return gcd;
}
void main()
{
int m, n;
scanf("%d,%d",&m,&n);
printf("The result is %d !, gcd(m,n));
}