program to accept three integers and print the largest of the three.Make use of only if statement.
Answers
Answered by
12
x=y=z=0
x=float( input("Enter the first number:"))
y=float(input("Enter the second digit number:"))
z=float (input("Enter the third number:"))
max=x
if y >max:
max=y
print("Largest number is",max)
Answered by
27
Answer:
here it is
Explanation:
num1 = float(input("Enter first number: "))
num2 = float(input("Enter second number: "))
num3 = float(input("Enter third number: "))
if (num1 >= num2) and (num1 >= num3):
largest = num1
elif (num2 >= num1) and (num2 >= num3):
largest = num2
else:
largest = num3
print("The largest number is", largest)
Similar questions