Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void super_swap(int &a, int &b){
- int k = a;
- a = b;
- b = k;
- }
- int main() {
- int a,b;
- cout << "Write integer a" << endl;
- cin >> a;
- cout << "Write integer b" << endl;
- cin >> b;
- super_swap(a,b);
- cout << "a = " << a << endl;
- cout << "b = " << b << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment