#include <stdio.h>
int main()
{
int a = 0, b = 0;
double c = 0;
printf("请输入求最小公倍数的两个数:");
scanf("%d %d", &a, &b);
c = a * b;
while (a != b)
{
if (a > b)
{
a -= b;
}
else
{
b -= a;
}
}
c /= a;
printf("最小公倍数是:%lf\n", c);
return 0;
}
网友评论