Question: Write a menu - driven program that determines the cost of a new membership. Your program must contain a function that displays the general information
Write a menudriven 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 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.
An example of the program is shown below:
Welcome to Stay Healthy and Fit center.
This program determines the cost of a new membership.
If you are a senior citizen, then the discount is of the regular membership price.
If you buy membership for twelve months and pay today, the discount is
If you buy and pay for or more personal training session today, the discount on each session is
Enter the cost of a regular membership per month:
Enter the cost of one personal training session:
Are you a senior citizen YyNn: n
Enter the number of personal training sessions bought:
Enter the number of month you are paying for:
The membership cost $
Since your program handles currency, make sure to use a data type that can store decimals with a decimal precision of
c
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
