home *** CD-ROM | disk | FTP | other *** search
- /*Turbo Menu copyright (c) HyTech Inc.
- Compiled under Turbo C v2.0
- */
-
- main(void)
- {
- char main_ans = 'z';
-
- while(main_ans != 'q' && main_ans != 'Q'){ /*break out of loop if one is true*/
-
- clrscr(); /* clear screen, Turbo C compiler*/
- printf("\n\n\n");
- printf(" Please note CONFIG.SYS must have: device=ansi.sys\n\n");
- printf(" ╔═══════════════════════════════╗\n");
- printf(" ║ PONZO TUTOR ║░\n");
- printf(" ║ ───────────────────────────── ║░\n");
- printf(" ║ Turbo Menu, (c) HyTech Inc. ║░\n");
- printf(" ║P.O Box 805 Dearborn, MI. 48121║░\n");
- printf(" ║ ──────────────────────────────║░\n");
- printf(" ║ A: Installation Instructions ║░\n");
- printf(" ║ B: A Great Software offer!! ║░\n");
- printf(" ║ C: Print an Order Form ║░\n");
- printf(" ║ D: Lessons Menu ║░\n");
- printf(" ║ E: Test Menu ║░\n");
- printf(" ║ F: View C Code For This Menu ║░\n");
- printf(" ║ Q: QUIT ║░\n");
- printf(" ╚═══════════════════════════════╝░\n");
- printf(" ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░\n\n");
- printf(" Please Enter Your Selection: ");
-
- main_ans = getch(); /*get user input without hitting enter*/
-
-
- switch(main_ans){ /*switch is used li an if statement*/
-
- case 'a':
- case 'A':
- install(); /* all called functions are declared as void because */
- break; /* they return no values*/
- case 'b':
- case 'B' :
- offer();
- break;
- case 'c':
- case 'C':
- order_frm();
- break;
- case 'd':
- case 'D':
- lesson_menu();
- break;
- case 'E':
- case 'e':
- test_menu();
- break;
- case 'f':
- case 'F':
- view_code();
- break;
- case 'q':
- case 'Q':
- clrscr();
- break;
- }
- }
- }
-
- /************************************************************************/
- int /*good habit to declare what type of valus the functions/*
- /*will be using. Always will default to int*/
- install(void)
- {
- system("browse ctutor.doc");
- }
-
-
- /************************************************************************/
- int
- offer(void)
- {
- system("browse offer.dat");
-
- }
-
-
- /************************************************************************/
- int
- order_frm(void)
- {
- system("copy order.frm prn");
- }
-
-
-
- /************************************************************************/
- int
- lesson_menu(void)
- {
- char lesson_ans = 'z';
-
- while(lesson_ans != 'q' && lesson_ans != 'Q'){
-
- clrscr();
- printf("\n\n\n");
- printf(" ╔══════════════════╗\n");
- printf(" ║ C Lessons Menu ║░\n");
- printf(" ║ ─────────────────║░\n");
- printf(" ║ A: Lesson 1 ║░\n");
- printf(" ║ B: Lesson 2 ║░\n");
- printf(" ║ C: Lesson 3 ║░\n");
- printf(" ║ D: Lesson 4 ║░\n");
- printf(" ║ E: Lesson 5 ║░\n");
- printf(" ║ F: Lesson 6 ║░\n");
- printf(" ║ G: Lesson 7 ║░\n");
- printf(" ║ H: Lesson 8 ║░\n");
- printf(" ║ I: Lesson 9 ║░\n");
- printf(" ║ J: Lesson 10 ║░\n");
- printf(" ║ K: Lesson 11 ║░\n");
- printf(" ║ L: Lesson 12 ║░\n");
- printf(" ║ Q: QUIT ║░\n");
- printf(" ╚══════════════════╝░\n");
- printf(" ░░░░░░░░░░░░░░░░░░░\n\n");
- printf(" Please Enter Your Selection: ");
-
- lesson_ans = getch();
-
- switch(lesson_ans){
-
- case 'a':
- case 'A':
- system("display lesson1");
- break;
- case 'b':
- case 'B' :
- system("display lesson2");
- break;
- case 'c':
- case 'C':
- system("display lesson3");
- break;
- case 'd':
- case 'D':
- system("display lesson4");
- break;
- case 'E':
- case 'e':
- system("display lesson5");
- break;
- case 'f':
- case 'F':
- system("display lesson6");
- break;
- case 'g':
- case 'G':
- system("display lesson7");
- break;
- case 'h':
- case 'H':
- system("display lesson8");
- break;
- case 'i':
- case 'I':
- system("display lesson9");
- break;
- case 'j':
- case 'J':
- system ("display lesson10");
- break;
- case 'k':
- case 'K':
- system("display lesson11");
- break;
- case 'l':
- case 'L':
- system("display lesson12");
- break;
- case 'q':
- case 'Q':
- clrscr();
- break;
- }
- }
- }
-
-
- /************************************************************************/
- int
- test_menu(void)
- {
-
- char test_ans ='z';
-
- while(test_ans != 'q' && test_ans != 'Q'){
- clrscr();
- printf("\n\n\n\n\n\n\n");
- printf(" ╔══════════════════╗\n");
- printf(" ║ C Test Menu ║░\n");
- printf(" ║ ─────────────────║░\n");
- printf(" ║ A: Test 1-5 ║░\n");
- printf(" ║ B: Test 6-8 ║░\n");
- printf(" ║ Q: QUIT ║░\n");
- printf(" ╚══════════════════╝░\n");
- printf(" ░░░░░░░░░░░░░░░░░░░\n\n");
- printf(" Please Enter Your Selection: ");
-
- test_ans = getch();
-
- switch(test_ans){
-
- case 'a':
- case 'A':
- system("display test1-5");
- break;
- case 'b':
- case 'B' :
- system("display test6-8");
- break;
- case 'q':
- case 'Q':
- clrscr();
- break;
- }
- }
- }
-
-
- /************************************************************************/
- int
- view_code(void)
- {
- system("browse menu.c");
- }