Advertisement
SergeyPGUTI

7.1.1

Nov 26th, 2015
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.22 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int Swap(int *x,int *y)
  7. {
  8.     int temp=*x;
  9.     *x=*y;
  10.     *y=temp;
  11. }
  12.  
  13. int main()
  14. {
  15.     int x,y;
  16.     cin>>x>>y;
  17.     Swap(&x,&y);
  18.     cout<<x<<" "<<y;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement