- A Block Comment, describing you and the program.
/****************************************************************
* Program One: Print a blank study schedule *
* *
* Programmer: Dan Bennett *
* Date: July 13, 2004 *
* For: CSCI 130 principles of Programming I *
* *
* This program prints a blank study schedule to the screen *
****************************************************************/
- Include Files.
#include <iostream>
#include <string>
- using namespace std;
using namespace std;
- Constant Definitions
const string HEADER=" Monday Tuesday Wednesday Thursday Friday " ;
- The main function
int main () {
- Variable declarations
string topLine, // the top and bottom of a box
sideLine; // the middle parts of a box.
- The executable code (with comments when necessairy.
// set up the values of the top line and side line.
topLine = "-----------------------------------------------";
sideLine = "| | | | | |";
// print the header at the top of the chart.
cout << HEADER << endl;
// print out the box.
cout << topLine << endl;
cout << sideLine << endl;
cout << sideLine << endl;
cout << sideLine << endl;
cout << topLine << endl;
- The end of the program
return 0;
}
- The above code