
Postlab Activities
Exercise 1: Key in the following program, compile it, and run it.
// Program Stars prints three rows of asterisks.
#include <iostream>
using namespace std;
int main ()
{
cout << "***********" << endl;
cout << " ********* " << endl;
cout << " ******* " << endl;
return 0;
}
Exercise 2: Edit program Stars so that it prints five asterisks centered on the fourth
line, three asterisks centered on the fifth line, and one asterisk centered on the sixth
line. Compile and run your program.
Exercise 3: Using program Stars as a model, write a program that prints the same
pattern on the screen but this time using a dollar sign symbol rather than an asterisk. ...