Programming Examples
Python program to print larger number using swap
Write a python program to print larger number using swap
x=int(input("Enter the first Number : "))
y=int(input("Enter the second Number : "))
if x>y:
x,y=y,x
print("The Larger Number is : ",y)
print("The smaller Number is : ",x)
Output
Enter the first Number : 45
Enter the second Number : 34
The Larger Number is :Â 45
The smaller Number is :Â 34
>>>Â
========================Â
Enter the first Number : 33
Enter the second Number : 90
The Larger Number is :Â 90
The smaller Number is :Â 33