// // Filename: pgm3_2a.cpp // // Description: Demonstration of User defined functions #1 // // ENSC 104: Digital Computer Programming // // Instructor: Dr. Walsh // // Section: 2 // // Date Created: 03/01/98 // Last Modified: 03/01/98 // // Name: N/A // // ***** Interface files ***** #include // ***** Function Prototypes ***** void displayHeader0( void ); void displayHeader1( int, int ); int menu( void ); main() { int choice = 0; displayHeader0(); displayHeader1( 12, 3 ); choice = menu(); cout << "\nYou selected " << choice << endl; return 0; } void displayHeader0( void ) { cout << "ENSC 104: Digital Computer Programming\n"; cout << "Homework #12\n"; cout << "Project Task #3\n"; cout << "Dr. Thomas R. Walsh\n\n"; } void displayHeader1( int homework, int task ) { cout << "ENSC 104: Digital Computer Programming\n"; cout << "Homework #" << homework << "\n"; cout << "Project Task #" << task << "\n"; cout << "Dr. Thomas R. Walsh\n\n"; } int menu( void ) { int local_choice=0; cout << " MAIN MENU\n"; cout << " *********\n\n"; cout << " Select Option 1\n"; cout << " Select Option 2\n"; cout << " Select Option 3\n"; cout << " Select Option 4\n"; cout << "Enter Choice: "; cin >> local_choice; return local_choice; }