输出a,b,c 求最大值。
这个代码怎么写?求给个面板
2016-03-27 19:53
程序代码:int max,tmp; int a=1,b=2,c=3; tmp=a>b?a:b; //if(a>b) tmp=a; else tmp=b; max=tmp>c?tmp:c; //if(tmp>c) max=tmp; else max=c;

2016-03-27 21:11
2016-03-27 21:17
程序代码:#include <stdio.h>
int max(int a,int b)
{
return a>b?a:b;
}
int main()
{
int a=1,b=2,c=3;
int tmp=max(a,b);
int maxNum=max(tmp,c);
printf("max=%d\n",maxNum);
return 0;
}

2016-03-27 21:25
2016-03-27 21:57
2016-03-27 23:29
2016-03-27 23:34

2016-03-28 02:20