Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 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 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 30% of the regular membership price.
If you buy membership for twelve months and pay today, the discount is 15%.
If you buy and pay for 6 or more personal training session today, the discount on each session is 20%.
Enter the cost of a regular membership per month: 50
Enter the cost of one personal training session: 10
Are you a senior citizen (Y,y/N,n): n
Enter the number of personal training sessions bought: 3
Enter the number of month you are paying for: 1
The membership cost = $80.00
Since your program handles currency, make sure to use a data type that can store decimals with a decimal precision of 2.
c++

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions