求大神帮忙
怎么通过调用函数求三个数的最小公倍数,帮忙看一下那错了?#include<stdio.h>
int max(int a,int b,int c);
int main()
{
int a,b,c,t;
scanf("%d %d %d",&a,&b,&c);
t=max(a, b,c);
printf("%d\n",t);
return 0;
}
int max(int a,int b,int c)
{
int f(int a,int b);
int t;
t=f(a,b);
if(t<c)
{
t=t+c;
c=t-c;
t=t-c;
}
while(t%c)
{
t=c;
c=t%c;
}
return t;
}
int f(int a,int b)
{
if(a<b)
{
a=a+b;
b=a-b;
a=a-b;
}
while(a%b)
{
a=b;
b=a%b;
}
return a;
}