#include <iostream>
using namespace std;
int add1( int &x )
{
x += 5, cout << "In function add1: the return value is x = " << x << endl; return x;
}
int add2( int &x )
{
x += 10, cout << "In function add2: the return value is x = " << x << endl; return x;
}
int main()
{
int x = 0, x1 = add1( x ), x2 = add2( x );
cout << x1 << " " << x2 << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKIAppbnQgYWRkMSggaW50ICZ4ICkgCnsKCXggKz0gIDUsIGNvdXQgPDwgIkluIGZ1bmN0aW9uIGFkZDE6IHRoZSByZXR1cm4gdmFsdWUgaXMgeCA9ICIgPDwgeCA8PCBlbmRsOyByZXR1cm4geDsKfQogCmludCBhZGQyKCBpbnQgJnggKSAKewoJeCArPSAxMCwgY291dCA8PCAiSW4gZnVuY3Rpb24gYWRkMjogdGhlIHJldHVybiB2YWx1ZSBpcyB4ID0gIiA8PCB4IDw8IGVuZGw7IHJldHVybiB4Owp9CiAKaW50IG1haW4oKSAKewoJaW50IHggPSAwLCB4MSA9IGFkZDEoIHggKSwgeDIgPSBhZGQyKCB4ICk7CgkKCWNvdXQgPDwgeDEgPDwgIiAiIDw8IHgyIDw8IGVuZGw7CgkKCXJldHVybiAwOwp9Cg==