Site icon codemaniacstudio

Write a python program to find maximum between three numbers.

Write a python program to find maximum between three numbers.

SOLUTION....

# Program to find maximum among three numbers using if-else

# Input
a = float(input("Enter first number: "))
b = float(input("Enter second number: "))
c = float(input("Enter third number: "))

# Logic using if-else
if a >= b and a >= c:
  print("A is big")
elif b >= c:
    print("B is big")
else:
    print("C is big")


OUTPUT

Exit mobile version