废话不多说,直接上代码:
#include<iostream>
#include<cmath>
using namespace std;
long int Find(long int n1,long int n2){
//求最小公倍数
long int hcf, temp, lcm;
hcf = n1;
temp = n2;
while(hcf != temp)
{
if(hcf > temp) hcf -= temp;
else temp -= hcf;