Description: |
Write a program to swap or exchange two numbers. You should not use any temporary or third variable to swap. |
Code: | ||
|
Output: |
Before swap: x value: 10 y value: 20 After swap: x value: 20 y value: 10 |
Description: |
Write a program to swap or exchange two numbers. You should not use any temporary or third variable to swap. |
Code: | ||
?
|
Output: |
Before swap: x value: 10 y value: 20 After swap: x value: 20 y value: 10 |
No comments:
Post a Comment