运行结果跟题目一致,哪里还需要改
#include <stdio.h>
/************found************/
int fun( x, y, z )
{ int j ,t,n,m;
j=1;
t=j%x;
m=j%y ;
n=j%z;
while(t!=0||m!=0||n!=0)
{ j++;
t=j%x;
m=j%y;
n=j%z;
}
/************found************/
return j;
}
main( )
{ int x1,x2,x3,j ;
printf("Input x1 x2 x3: "); scanf("%d%d%d",&x1,&x2,&x3);
printf("x1=%d, x2=%d, x3=%d \n",x1,x2,x3);
j=fun(x1,x2,x3);
printf("The minimal common multiple is : %d\n",j);
}