Problem A: 调用函数,求三个数中最大数

Posted chenlong991223

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Problem A: 调用函数,求三个数中最大数相关的知识,希望对你有一定的参考价值。

#include<stdio.h>
int max(int a,int b,int c);
int main()
{
    int a,b,c;
    while(scanf("%d %d %d",&a,&b,&c)!=EOF){
    printf("%d
",max(a,b,c));}
    return 0;
}

int max(int a,int b,int c)
{
    int m;
    m=a;
    if(b>m)
    m=b;
    if(c>m)
    m=c;
    return m;
}

 

以上是关于Problem A: 调用函数,求三个数中最大数的主要内容,如果未能解决你的问题,请参考以下文章