作业帮 > 综合 > 作业

下面这道题哪里有错误?怎么改

来源:学生作业帮 编辑:搜搜考试网作业帮 分类:综合作业 时间:2024/06/06 09:28:58
下面这道题哪里有错误?怎么改
#include
int max3(int a,int b,int c); /*函数声明*/
void main ()
{
int a,b,c;
int max;
printf("Please input three numbers:");
scanf("%d%d%d",&a,&b,&c);
max = max3(a,b,c); /*调用max3函数,其中a,b,c作为其参数,max用于保存max3函数的返回值*/
printf("the maximum number of %d,%d,%d is %d\n",a,b,c,max);
}
/*可在此编写max3函数,实现求三个数中的最大值的功能*/
int Max3(int a,int b,int c)
{
int m;
if (a
下面这道题哪里有错误?怎么改
#include
int max3(int a,int b,int c); /*函数声明*/
void main ()
{
int a,b,c;
int max;
printf("Please input three numbers:");
scanf("%d%d%d",&a,&b,&c);
max = max3(a,b,c); /*调用max3函数,其中a,b,c作为其参数,max用于保存max3函数的返回值*/
printf("the maximum number of %d,%d,%d is %d\n",a,b,c,max);
}
/*可在此编写max3函数,实现求三个数中的最大值的功能*/
int max3(int a,int b,int c) //函数定义的函数名必须和函数声明、调用的一致,所以是max不是Max
{
int m;
if (a