[Previous Homework] [Next Homework]

hw10 - Menus with Do-While Loops and Switch


From Linux on the GL machine:
  • Copy your menu1.c source code into a file called menu2.c in your ./cmsc104/hw10 directory

  • Compile the program:
    gcc -lm -o menu2 menu2.c

  • Run the program to make sure it works:
    ./menu2

  • Use the SUBMIT utility turn in the homework.
    submit cs104_grasso hw10 menu2.c menu2


Modify the program that you wrote in HW09 to follow the code template in menu.c

  • Convert the program to use one do-while loop to display the menu, validate input, perform the options, and exit the program.

  • Use a switch statement to process the options (including invalid options).


Make sure that you follow all the coding standards