Check sibling questions

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

Get live Maths 1-on-1 Classs - Class 6 to 12

Ask a doubt
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 13 years. He provides courses for Maths, Science, Social Science, Physics, Chemistry, Computer Science at Teachoo.