Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- void swipe(int&x, int&y);
- int main ()
- {
- int a=10,b=20;
- swipe(a,b);
- cout << a << "\n" << b;
- return 0;
- }
- void swipe(int&x, int&y)
- {
- int temp;
- temp = x;
- x = y;
- y = temp;
- }
Advertisement
Add Comment
Please, Sign In to add comment