(IN C LANGUAGE) The cost to become a member of a fitness center is as follows: (a)...

70.2K

Verified Solution

Question

Programming

(IN C LANGUAGE) The cost to become a member of a fitness centeris as follows:

(a) the senior citizens discount is 30%

(b) if the membership is bought and paid for 12 or more months,the discount is 15%

(c) if more than five personal training sessions are bought andpaid for, the discount on each session is 20%

Write a that determines the cost of a new membership.

Your program must contain: a function that displays the generalinformation about the fitness center and its charges a functionthat prompts for the price per month of a membership and the costof each personal trainer session

a function that prompts for all of the necessary information todetermine the cost of a membership

a function to determine the membership cost

STARTER CODE:

#include
#include

void setPrices(...);

void getInfo(...);
double membershipCost(...);
void displayCenterInfo();


int main()
{
}

void displayCenterInfo()
{
   printf(\"Welcome to Stay Healty and Fitcenter.\n\");
   printf(\"This program determines the cost of a newmembership.\n\");
   printf(\"If you are a senior citizen, then the discountis 30%% of the regular membership price.\n\");
   printf(\"If you buy membership for twelve months andpay today, the discount is 15%%.\n\");
   printf(\"If you buy and pay for 6 or more personaltraining session today, the discount on each session is20%%.\n\n\");
}

Answer & Explanation Solved by verified expert
4.0 Ratings (804 Votes)
sourceCodecinclude include void setPricesdouble doublevoid getInfobool bool bool int intdouble membershipCostdouble int double int bool boolboolvoid displayCenterInfoint mainbool seniorCitizenbool boughtSixOrMoreSessionsbool paidTwelveOrMoreMonthsint numberOfMembershipMonthsintnumberOfPersonalTrainingSessionsdoubleregularMembershipChargesPerMonthdoublecostOfOnePersonalTrainingSessiondouble memberCostdisplayCenterInfo Note is used to pass thevariable as by reference to the    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students