/****************************************************************************** Lab Exercise #4 -- Part A ******************************************************************************/ using namespace std; #include int f( int, int&, int& ); int main() { int A = 5, B = 20, C = 15; cout << endl << f( A, B, C ) << endl; // Value of f: ____________ cout << "Value of A: " << A << endl; // Value of A: ____________ cout << "Value of B: " << B << endl; // Value of B: ____________ cout << "Value of C: " << C << endl; // Value of C: ____________ A = 15; B = 10; C = 5; cout << endl << f( A, B, C ) << endl; // Value of f: ____________ cout << "Value of A: " << A << endl; // Value of A: ____________ cout << "Value of B: " << B << endl; // Value of B: ____________ cout << "Value of C: " << C << endl; // Value of C: ____________ A = 25; B = 5; C = 10; cout << endl << f( A, B, C ) << endl; // Value of f: ____________ cout << "Value of A: " << A << endl; // Value of A: ____________ cout << "Value of B: " << B << endl; // Value of B: ____________ cout << "Value of C: " << C << endl; // Value of C: ____________ } int f( int X, int& Y, int& Z ) { if (X<10) { X = X + 10; } Y = Y - X / 2; if (Y > 8) { Z = Z - 12; } return X+Y+Z; }