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