各位大佬,下面的代码哪里有问题哇?
问题描述:
设计一个函数 Dmax(x,y),求出三个数的最大数
def Dmax(a,b,c):
if c<=a>=b:
return a
elif c<=b>=a:
return b
else:
return c
x=int(input())
y=int(input())
z=int(input())
c=Dmax(x,y,z)
print("%d,%d,%d 的最大值是%d"%(x,y,z,c))
答
# -*- coding: UTF-8 -*-
def Dmax(a,b,c):
if c<=a and a>=b:
return a
elif c<=b and b>=a:
return b
else:
return c
x=int(input())
y=int(input())
z=int(input())
c=Dmax(x,y,z)
print("%d,%d,%d 的最大值是%d"%(x,y,z,c))