6.以下程序的运行结果是_____. #include<stdio.h> main() {int a=1,b=2,c; c=max(a,b); printf("max is %

2024-11-20 19:46:18
推荐回答(2个)
回答1:

#include
main()
{int a=1,b=2,c;
int max(int x,int y);//函数申明
c=max(a,b);
printf("max is %d\n",c);
}
int max(int x,int y)//有返回值的
{int z; //定义的z
z=(x>y)?x:y;
return(z);
}
结果是max is 2

回答2:

运行果果是:max is 2