 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
void
PrintActivity( int temp ) //
Value parameter
|
|
// Given the value of temp, this function prints a
|
|
|
// message indicating an appropriate activity
|
|
|
{ cout << "The recommended
activity is ";
|
|
|
if (temp > 85)
|
|
|
cout <<
"swimming." << endl;
|
|
|
else if (temp > 70)
|
|
|
cout << "tennis."
<< endl;
|
|
|
else if (temp > 32)
|
|
|
cout << "golf."
<< endl;
|
|
|
else if (temp > 0)
|
|
|
cout << "skiing."
<< endl;
|
|
|
else
|
|
|
cout << "dancing."
<< endl;
|
|
|
}
|
|