Saturday, 13 May 2017

Greatest number among 3 numbers which are user entered

#Greatest number among 3 numbers which are user entered

#Accepting 3 numbers from user
a=int(input('enter number:'))
b=int(input('enter number:'))
c=int(input('enter number:'))

# find which is greatest number
if a>b:
    if a>c:
        print(a,'is greatest number')
    else:
        print(c,'is greatest number')
else:
    if b>c:
        print(b,'is greatest number')
    else:
        print(c,'is greatest number')

OUTPUT:

No comments:

Post a Comment