1: //sayhi2.cpp 2: //Displays a greeting. 4: #include <iostream> 5: using namespace std; 8: void DescribeProgram(); 9: void DisplayGreeting(); 12: int main() 13: { 14: DescribeProgram(); 15: DisplayGreeting(); 16: cout << endl; 17: } 20: void DescribeProgram() 21: //Pre: The cursor is at the left margin. 22: //Post: The program description has been displayed, 23: // preceded and followed by at least one blank line. 24: { 25: cout << "\nThis program displays a greeting.\n\n"; 26: } 29: void DisplayGreeting() 30: //Pre: The cursor is at the left margin. 31: //Post: A one-line greeting has been displayed, 32: // preceded and followed by at least one blank line. 33: { 34: cout << "\nHi there!\n\n"; 35: }