
Lesson 2-2: Components of a Program
34 | Chapter 2
Name __________________________________________ Date _______________________
Section _________________________________________
This lesson uses program Greet. Compile and rerun the program after each modification.
// Program Greet prints a greeting on the screen.
#_________
#_________
using namespace std;
_________ string FIRST_NAME = "Sarah";
_________ string LAST_NAME = "Sunshine";
_____ _______ ()
{
_______ message;
_______ name;
name = FIRST_NAME + LAST_NAME;
message = "Good morning " + name + '.';
cout << message _______ endl;
_______ 0;
}
Exercise 1: Program Greet prints a greeting on the screen. However, ...