#include<stdio.h>
int main(){
int a,b,t,m;
scanf("%d,%d",&a,&b);
m=a*b;
while(b!=0){
t=a%b;
a=b;
b=t;
}
printf("最大公约数%d\n",a);
printf("最小公倍数%d",m/a);
return 0;
}
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交