Write a Python program to find maximum between three numbers.

PROGRAM

# Program to find the maximum between three numbers

# Take input from the user
num1 = float(input(“Enter the first number: “))
num2 = float(input(“Enter the second number: “))
num3 = float(input(“Enter the third number: “))

# Compare the numbers
if num1 >= num2 and num1 >= num3:
print(f”The maximum number is: {num1}”)
elif num2 >= num1 and num2 >= num3:
print(f”The maximum number is: {num2}”)
else:
print(f”The maximum number is: {num3}”)

OUTPUT

TRY THE ABOVE CODE

Leave a Reply

Your email address will not be published. Required fields are marked *

sign up!

We’ll send you the hottest deals straight to your inbox so you’re always in on the best-kept software secrets.