- 求两个自然数的最小公倍数
#include <iostream>
using namespace std;
//先找两个数的最大公约数,然后把两个数的乘积,除以最大公约数即可。
int FindYue(int a,int b){
int res = a%b;
while(res)
{
a = b;
b = res;
res = a%b;
}
return b;
}
int main()
{
int a,b;
cin>>a;
cin>>b;
int nYue = FindYue(a,b);
cout<<a*b/nYue<<endl;
system("pause");
return 0;
}