마지막에 최솟값은 --입니다 최댓값은 --입니다 라고 나오게 하려면 어떻게할까요

2021-04-11 (일) 19:14:19 3,329

 

A = int(input("첫 번째 숫자를 입력하세요"))

B = int(input("두 번째 숫자를 입력하세요"))

C = int(input("세 번째 숫자를 입력하세요"))

print("최댓값은 A입니다.", A>B and A>C)

print("최댓값은 B입니다.", B>A and B>C)

print("최댓값은 C입니다.", C>B and C>A)

print("최솟값은 A입니다.", not(A>B or A>C))

print("최솟값은 B입니다.", not(B>A or B>C))

print("최솟값은 C입니다.", not(C>B or C>A))

|

답변을 작성하려면 로그인이 필요합니다.