Back to DFS's C Page


OAC Problem Set IV

Using a Switch
Due: Before your test on 12 Nov 99

This is the classic Chinese menu problem. Include all of the following features in a single program.

To save you the effort of repeatedly typing in the same data while testing your program, follow these instructions:

  1. Create a test input file called menudata which contains the following data:
    2
    30
    30
    108
    159
    0
    
  2. After you have compiled your program called OurLastNamesMenu.c (where OurLastNames is replaced with your names), type the appropriate modification of the following on the command line.
    OurLastNamesMenu < menudata
    
    This will cause the program to get its input from the file instead of from the keyboard. Guess how I am going to test your program!

Copies of your source file and executable are to be copied onto my disk. You are also to hand in hardcopy of your source file.


Created 9 Nov 1999
© 1999 DFStermole