用C语言编写一个求两个数最大值的函数,在主函数输入3个整数,调用该函数输出其中最大值

日期:2017-08-21 09:06:16 人气:1

用C语言编写一个求两个数最大值的函数,在主函数输入3个整数,调用该函数输出其中最大值

int max(int a, int b){return a>b?a:b;}int main(){ int a,b,c; scanf("%d%d",&a,&b,&c); printf("%d\n", max(max(a,b),c)); return 0;}
    A+
热门评论