Write A Python Program To Find Max Between Four Numbers.
Write A Python Program To Find Max Between Four Numbers.
Code:
num1 = int(input("Enter The Number 1 :"))
num2 = int(input("Enter The Number 2 :"))
num3 = int(input("Enter The Number 3 :"))
num4 = int(input("Enter The Number 4 :"))
if num1>num4 :
f1 = num1
else :
f1 = num4
if num2>num3 :
f2 = num2
else :
f2 = num3
if f1>f2 :
print(f1,"is Greatest")
else:
print(f2,"is Greatest")
Output:
Enter The Number 1 :25
Enter The Number 2 :26
Enter The Number 3 :27
Enter The Number 4 :28
28 is Greatest
Comments
Post a Comment