
Lesson 5-2: Boolean Expressions
Conditions, Logical Expressions, and Selection Control Structures | 111
Name __________________________________________ Date _______________________
Section _________________________________________
Use program Grade for the exercises in this lesson.
// Program Grade prints appropriate messages based on a
// grade read from the keyboard.
#include <iostream>
using namespace std;
int main ()
{
int grade;
cout << "Enter an integer grade between 50 and 100."
<< " Press return. " << endl;
cin >> grade;
if /* TO BE FILLED IN */
cout << "Congratulations!" << endl;
return 0;
}
Exercise 1: When completed, program Grade reads an integer ...