高手们,C语言第一天学求三个数中最大值的程序,错在哪?怎么改?

调试程序没有错误,但是组建却出现max没有定义么?
2025-04-28 19:29:30
推荐回答(1个)
回答1:

//给你个新的,你的代码太乱了
#include
#include

int main()
{
int max(int,int,int);
int a,b,c;

scanf("%d %d %d",&a,&b,&c);
printf("max=%d",max(a,b,c));
return 0;
}
int max(int a,int b,int c)
{

if(a>b)
b=a;
return b>c ? b : c;
}