Advertisement
Guest User

dan

a guest
Nov 21st, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. void f(int &a, int b)
  4. {a=2*a;
  5. b=2*b;
  6. cout<<"a="<<a<< " b="<<b<<endl;
  7. }
  8. int main()
  9. {int x=1,y=2;
  10. cout<<"x="<<x<<" y="<<y<<endl;
  11. f(x,y);
  12. cout<<"x="<<x<<" y="<<y<<endl;
  13. return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement