下面程序为求两个数的最大公约数和最小公倍数。
#include <stdio.h>
void main()
{ int m,n,num1,num2,temp;
printf("Input two positive integer:\n");
scanf("%d,%d",&num1, ① );
if(num1<num2)
{temp=num1; num1=num2; num2= ② ;}
m=num1;
n=num2;
while(n!=0)
{ temp= ③ ;
m=n;
n=temp;
}
printf("The grestest common divisor is %d\n",m);
printf("The lowest common multiple is %d\n",num1*num2/ ④ );
}
填空