Hey I recently started to learn python. Below is the program to find the largest number, I want to know how do I print the second largest number. Thanks in advance.
x=int(input("Enter the 1st number: \n"))
y=int(input("Enter the 2nd number: \n"))
z=int(input("Enter the 3rd number: \n"))
if x>y:
f1=x
else:
f1=y
if y>z:
f2=y
else:
f2=z
if f1>f2:
print(str(f1)+" is greatest")
else:
print(str(f2)+" is greatest")