Answered step by step
Verified Expert Solution
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 ;
if the membership is bought and paid for or more months, the discount is ;
if more than five personal training sessions are bought and paid for, the discount on each session is
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
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started