Answer:
Written in Python:
num1 = int(input("Enter a number: "))
num2 = int(input("Enter a number: "))
num3 = int(input("Enter a number: "))
if(num1 >= num3 and num1 >= num2):
print("Largest: "+str(num1))
elif(num2 >= num3 and num2 >= num1):
print("Largest: "+str(num2))
else:
print("Largest: "+str(num3))
Explanation:
The next three lines prompt user for input of three numbers
<em>num1 = int(input("Enter a number: "))</em>
<em>num2 = int(input("Enter a number: "))</em>
<em>num3 = int(input("Enter a number: "))</em>
This following if condition checks if num1 is the largest
<em>if(num1 >= num3 and num1 >= num2):</em>
<em> print("Largest: "+str(num1))</em>
This following if condition checks if num2 is the largest
<em>elif(num2 >= num3 and num2 >= num1):</em>
<em> print("Largest: "+str(num2))</em>
The last condition assumes num3 is the largest if the previous conditions are false
<em>else:</em>
<em> print("Largest: "+str(num3))</em>
<em></em>