hw07 - Functions 2

Make sure that you follow all the coding standards
From Linux on the GL machine:


Do the following:

  • Copy your menu.c code from the hw6 directory to your hw7 directory
  • Rename the source file to functions2.c
  • Modify the code to do the following:
    • Implement the 3 functions that are called from the menu
      • The function should request user input specific to that function
        • Make sure that you echo the input back to the user.
      • Calculate the result
      • Return the result as the appropriate data type
    • Create a new file called functions2.h that contains the function declarations for those 3 functions
    • Add the #include "functions2.h" statement to your functions2.c source file
  • Use a switch statement to process each user request
    • Call the appropriate function for that menu item.
    • Print the result
  • After processing, redisplay the menu.