Write a program that takes three numbers as input from the user, and prints the largest.


Sample Run

Enter a number: 20

Enter a number: 50

Enter a number: 5


Largest: 50

Hint: Remember that the numbers should be compared numerically. Any input from the user must be transformed into an integer, but printed as a string. code using python

Respuesta :

Answer:

a = int(input())

b = int(input())

c = int(input())

print(str(a)) if a >= b and a >= c else print(str(b)) if b >= a and b >= c else print(str(c))

Explanation:

a,b,c are your 3 inputs so you can use if elif else statement. I made it into a one-liner because why not. Also, they start out as integers and then are printed as a string.