User Defined Functions

The cost to become a member of a fitness center is as follows:

The senior citizens discount is 30%

If the membership is bought and paid for 12 or more months, the discount is 15%

If more than five personal training sessions are bought and paid for, the discount on each session is 20%.

Write a menu-driven program that determines the cost of a new membership. Your program must contain a function that displays the general information about the fitness center and its charges, a function to get all of the necessary information to determine the membership cost, and a function to determine the membership cost. Use appropriate parameters to pass information in and out of a function. (Do not use any global variables.)


I honestly have no idea of what to do. My professor did not properly teach us about User-Defined Functions. I really need help understanding and writing this program.
Last edited on
This link talks about functions: http://www.cplusplus.com/doc/tutorial/functions/

This link talks about control flow (i.e. if-else statements, loops and switch): http://www.cplusplus.com/doc/tutorial/control/

Hopefully, it gives you and idea to begin to code. At least, write a pseudocode of the assignment. If you are able to begin to write the code, we may be able to help you to pin point the issue.

That way you would get a better answer than 42 (reference: https://www.youtube.com/watch?v=aboZctrHfK8)

Topic archived. No new replies allowed.