Programming Examples
Python program to print the largest number
Program to print the largest number
Solution
num1=int(input("Enter the first number"))
num2=int(input("Enter the second number"))
num3=int(input("Enter the third number"))
max=num1
if num2>max:
max=num2
if num3>max:
max=num3
print("Largest number is:",max)
Output/ Explanation:
Enter the first number27
Enter the second number37
Enter the third number17
('Largest number is:', 37)