Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- cout << "Program to swap between to given numbers\n";
- cout << "----------------------------------------\n";
- cout << "Enter the first number: ";
- int a;
- cin >> a;
- cout << "Enter the second number: ";
- int b;
- cin >> b;
- int temp = a;
- a = b;
- b = temp;
- cout << "\nAfter Swapping.....\n\n";
- cout << "The first number is " << a << '\n';
- cout << "The second number is " << b << '\n';
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement