C# Program to swap two numbers without third variableWe can swap two numbers without using third variable. There are two common ways to swap two numbers without using third variable:
Program 1: Using ∗ and /Let's see a simple C# example to swap two numbers without using third variable. Output: Before swap a= 5 b= 10 After swap a= 10 b= 5 Program 2: Using + and -Let's see another example to swap two numbers using + and -. Output: Before swap a= 5 b= 10 After swap a= 10 b= 5 Next TopicC# Program to convert Decimal to Binary |
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