#include <stdio.h>
int main()
{
int i, j,k,t=0;
printf("请输入两个数:");
scanf_s("%d,%d", &i,&j);
for (k = 1; k <= i * j; k++)
{
if (i%j==0||j%i==0)
{
printf("%d,%d的最小公倍数为%d\n", i, j, j > i ? i:j);
break;
}
t = i * k;
if (t % j == 0)
{
printf("%d,%d的最小公倍数为%d\n", i, j, t);
break;
}
}
return 0;
}
标签:两个,公倍数,最小,break,int,printf,main From: https://blog.51cto.com/u_16336886/8447430