1011: 三个整数的最大值

版权声明:看看就好,如需转载,注明一下出处 https://blog.csdn.net/sinat_34337520/article/details/89015644

Description

编写一个程序,输入a、b、c三个值,输出其中最大值。

Input

一行数据,分别为a b c (|a|, |b|, |c| < 100)

Output

a b c其中最大的数

Sample Input

10 20 30

Sample Output

30

#include <stdio.h>

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

猜你喜欢

转载自blog.csdn.net/sinat_34337520/article/details/89015644