#include <stdio.h>
/*
int main()
{
int gcd(int n1, int n2);
int m, n, r1, r2;
printf("请输入两个正整数:");
scanf("%d%d", &m, &n);
r1 = gcd(m, n);
r2 = lcm(m, n);
printf(" %d 与 %d \n最大公约数为:%d\n最小公倍数为:%d\n", m, n, r1, r2);
system("pause");
return 0;
}
//求两个数的最大公约数
int gcd(int n1, int n2)
{
int temp = -1;
while(temp != 0)
{
temp = n1 % n2;
n1 = n2;
n2 = temp;
}
return n1;
}
//求两个数的最小公倍数
int lcm(int n1, int n2)
{
int i;
// int gcd(int n1, int n2);
// return (n1 * n2 / gcd(n1, n2));
for(i = n1 > n2 ? n1 : n2; (i % n1 != 0) || (i % n2 != 0); i++);
return i;
}
*/