Electrical and Computer Engineering
3 of 22
UAH
CPE 112
Multiple Alternatives
•cout << “The recommended activity is ”;
•if (temperature > 85)
•    cout << “swimming.” << endl;
•else if (temperature > 70)
•    cout << “tennis.” << endl;
•else if (temperature > 32)
•    cout << “golf.” << endl;
•else if (temperature > 0)
•    cout << “skiing.” << endl;
•else
•    cout << “dancing.” << endl;