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")

 

[Class 11] Write a program to find the largest number among the three - Long Answer Type Questions (5 Marks each)

Remove Ads Share on WhatsApp
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh is an IIT Kanpur graduate and has been teaching for 16+ years. At Teachoo, he breaks down Maths, Science and Computer Science into simple steps so students understand concepts deeply and score with confidence.

Many students prefer Teachoo Black for a smooth, ad-free learning experience.