Answer:
In Python:
n1 = int(input("Enter a number: "))
n2 = int(input("Enter a number: "))
n3 = int(input("Enter a number: "))
if n1 >= n2 and n1 >= n3:
print("Largest: "+str(n1))
elif n2 >= n1 and n2 >= n3:
print("Largest: "+str(n2))
else:
print("Largest: "+str(n3))
Step-by-step explanation:
The next three lines get three numbers from the user
n1 = int(input("Enter a number: "))
n2 = int(input("Enter a number: "))
n3 = int(input("Enter a number: "))
This checks if the first number is greater than the other two. If yes, the first number is printed as the largest
if n1 >= n2 and n1 >= n3:
print("Largest: "+str(n1))
This checks if the second number is greater than the other two. If yes, the second number is printed as the largest
elif n2 >= n1 and n2 >= n3:
print("Largest: "+str(n2))
This prints the third number as the largest, if the other two conditions fail
else:
print("Largest: "+str(n3))