Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int funkcja(int &x)
- {
- cout << x << endl; // 2. 10
- ++x;
- cout << x << endl; // 3. 11
- x *= 10;
- cout << x << endl; // 4. 110
- return x; // 5. 110
- }
- int main()
- {
- int x = 10;
- cout << x << endl; // 1. 10
- cout << funkcja(x) << endl;
- cout << x << endl; // 6. 110
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment