C program to swap two numbers?

Today i am going to tell you "How to swap two number with or without third varaible in C language?"
Swap two number in C

Program To Swap Two Numbers Using Third Variable
Output:

Enter first number: 15
Enter second number: 30

After swapping, First Number = 30
After swapping, Second Number = 15

Program To Swap Two Numbers Using Third Variable

Output:

Enter first number: 5
Enter second number: 3

After swapping, First Number = 3
After swapping, Second Number = 5


Hope you enjoyed the tutorial.


Thanks.
C program to swap two numbers? C program to swap two numbers? Reviewed by CodiBucket on 10:01 Rating: 5

No comments:

Facebook

Powered by Blogger.