题目描述编写一个程序,输入a、b、c三个值,输出其中最大值。输入一行数组,分别为a b c,输出a b c其中最大的数。样例:输入10 20 30,样例输出30。

max = 0
a, b, c = map(int, input().split())
if a>b:
	if a>c:
		max = a
	else:
		max = c
elif b>c:
	max = c
else:
	max = c

更多推荐

python [编程入门]三个数最大值