1778: 求三个数的最大者

题目描述
编写一个C程序,输入a,b,c三个整数,输出其中最大者。
输入
输入a,b,c三个整数。
输出
输出a,b,c三个整数中的最大值。
样例输入
23 345 5888
样例输出
5888

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int a,b,c;
    int t;
    scanf("%d%d%d",&a,&b,&c);
    if(a>=b)
        t=a;
    else
        t=b;
    if(t>=c)
        printf("%d",t);
    else
        printf("%d",c);
    return 0;
}

猜你喜欢

转载自blog.csdn.net/rating_/article/details/83347450