int MaxCommonFactor(int a,int b); //用到的计算最大公约数的函数 int main() {
int a,b,s;
scanf(\"%d,%d\",&a,&b);
s = MaxCommonFactor(a,b); printf(\"%d\",s); return 0; }
int MaxCommonFactor(int a,int b) {
int m,i;
if(a <= 0 || b <= 0) return -1; 返回-1 else {
m=a 0;i--) 环找到最大公约数 {
if(a%i == 0 && b%i == 0) 公约数时,并返回 } }
return 0; }
//不满足的输入的a,b,//找出两数中最小的 //从较小的数开始循return i; //判断是