Write a program to find the largest number among the three given numbers.

 

Answer:

Code:

a = int(input( "Enter first number: " ))

b = int(input( "Enter second number: " ))

c = int(input( "Enter third number: " ))

if (a > b): 

    if (a > c): 

        print (a, "is the largest number"

    else: 

        print (c, "is the largest number"

else: 

    if (b > c): 

        print (b, "is the largest number"

    else: 

        print (c, "is the largest number")

 

Long Question 2 - Teachoo.jpg

Go Ad-free
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 14 years. He provides courses for Maths, Science and Computer Science at Teachoo