#include <iostream>
using namespace std;
int add1(int &x) {
x += 5;
cout << "in function 1: x = " << x << endl;
return x;
}
int add2(int &x) {
x += 10;
cout << "in function 2: x = " << x << endl;
return x;
}
int main() {
int x = 0;
cout << add1(x) << " " << add2(x) << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IGFkZDEoaW50ICZ4KSB7Cgl4ICs9IDU7Cgljb3V0IDw8ICJpbiBmdW5jdGlvbiAxOiAgeCA9ICIgPDwgeCA8PCBlbmRsOwoJcmV0dXJuIHg7Cn0KCmludCBhZGQyKGludCAmeCkgewoJeCArPSAxMDsKCWNvdXQgPDwgImluIGZ1bmN0aW9uIDI6ICB4ID0gIiA8PCB4IDw8IGVuZGw7CglyZXR1cm4geDsKfQoKaW50IG1haW4oKSB7CglpbnQgeCA9IDA7Cgljb3V0IDw8IGFkZDEoeCkgPDwgIiAiIDw8IGFkZDIoeCkgPDwgZW5kbDsKCXJldHVybiAwOwp9