求两个整数的最大公因子
#include "stdio.h"void main()
{
int m,n,r;
printf("please input two numbers:\n");
scanf("%d,%d",&m,&n);
while(n!=0) //下面运用欧几里德算法
{
m=n;
r=m%n;
n=r;
}
printf("The two numbers' greatest common divisor is %d!\n",m);
}
我输入任何两个数,都是输出右边的,原因我错在哪了??请帮忙看看