江湖救急 公约公倍(错误)
#include<stdio.h>int main(void)
{
int max(int x,int y);
int min(int x,int y);
int c,n,x,y,s1,s2;
while(scanf("%d",&n)!=EOF)
{
for(c=0;c<n;c++)
{
scanf("%d%d",&x,&y);
s1=max(x,y);
s2=min(x,y);
printf("%d %d",x,y);
}
}
return 0;
}
int max(int x,int y);
{int z,t;
if(x<y)
{z=x;
x=y;
y=z;}
while((t=x%y)!=0)
{ x=y;
y=t;}
return x;
}
int min(int x,int y);
{int s;
s=x*y/s1;
return s;
}
不知道那里错了!请大家帮忙改下!!