
Lesson 5-5: Nested Logic
116 | Chapter 5
Name __________________________________________ Date _______________________
Section _________________________________________
Use the following shell for the exercises in this lesson.
// Program Temperature reads in a temperature and prints an
// appropriate message.
#include <iostream>
using namespace std;
int main ()
{
int temperature;
cout << "Enter the temperature in your room." << endl;
cin >> temperature;
/* TO BE FILLED IN */
return 0;
}
Exercise 1: Add five if-then statements to program Temperature so that one of the following
messages is printed based on the value of temperature.
Temperature Message
> 90
Visit a ...