Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please complete using C + + The cost to become a member of a fitness center is as follows: the senior citizens discount is 3

Please complete using C++
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 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.

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

Recommended Textbook for

MongoDB Applied Design Patterns Practical Use Cases With The Leading NoSQL Database

Authors: Rick Copeland

1st Edition

1449340040, 978-1449340049

More Books

Students also viewed these Databases questions

Question

8. Fails to make the morally best decision in a given situation

Answered: 1 week ago