Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Code to find maximum number using if else

print("Find the maximum Number")
print ("==========")
def FindMaximum(n1,n2,n3):
    if n1>n2:
        if n1>n3:
            maxNumber=n1
        else:
            maxNumber=n3
    elif n2>n3:
        maxNumber=n2
    else:
        maxNumber=n3
    return maxNumber
def main():
    n1 = int(input("Enter first number: "))
    n2 = int(input("Enter Second numer: "))
    n3 = int(input("Enter Third number: "))
    
    maximum  = FindMaximum(n1,n2,n3)
    print("Maximum number is", maximum)
    
main()
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Code #find #maximum #number
ADD COMMENT
Topic
Name
1+6 =