Saturday 12 November 2016

Nested If Statement in Python

print "Enter first number>> "
a=int(raw_input())
print "Enter Second number>> "
b=int(raw_input())
print "Enter Third number>> "
c=int(raw_input())
if(a>b):
    if(a>c):
            print "First number is Greatest "
    else:
            print "Third number is Greatest "

else:
    if(b>c):
            print "Second number is Greatest "
    else:
            print "Third number is Greatest "

No comments:

Post a Comment