Program to swap two numbersThis program is to swap/exchange two numbers by using a variable. For example: Algorithm
Java ProgramOutput: Enter the value of X and Y 2 3 before swapping numbers: 2 3 After swapping: 3 2 C ProgramOutput: Enter the value of X and Y 29 39 before swapping numbers: 29 39 After swapping: 39 29 Python ProgramOutput: Enter the value of X? 87 Enter the value of Y? 43 before swapping numbers: 87 43 After swapping: 43 87 PHP ProgramOutput: Enter the value of x 33 Enter the value of Y 22 before swapping numbers: 33 22 After swapping 22 33 C# ProgramOutput: Enter the value of x and y 65 54 before swapping numbers: 65 54 After swapping: 54 65 Next Topic# |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India