楼主的程序后面注释没有就好了哦
#include<stdio.h>
int gys(int x,int y)
{
int r;
while(y!=0)
{
r=x%y;
x=y;
y=r;
}
return(x);
}
main( )
{
int num1,num2,a,c,d;
printf("qing shu ru liang ge zheng shu:");
scanf("%d%d",&num1,&num2);
a=gys(num1,num2);
printf("liang ge shu de gong yue shu shi %d\n",a);
printf("liang ge shu de gong bei shu shi %d\n",num1*num2/a);
getch( );
}