
Lesson 1-6: Entering, Compiling, and Running a New Program
16 | Chapter 1
Name __________________________________________ Date _______________________
Section _________________________________________
Exercise 1: Enter the editor and key in the following program. You are not expected to
understand what it does; just copy it exactly as shown.
// Program Area calculates the area of a square.
// The user is prompted to enter the number of inches on each
// side. Note that "endl" in line 7 ends in the letter "l", not
// the number one.
#include <iostream>
using namespace std;
int main ()
{
int inches;
cout << "Enter the number of inches on a side "
<< endl;
cout ...