Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can't fix my code please help! A health club currently charges $250.50 per year for membership. It has announced that it will increase its membership

can't fix my code please help!

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

A health club currently charges $250.50 per year for membership. It has announced that it will increase its membership fee by 2% each year. Assume the user has been asked to enter the number of additional years they plan to keep their membership. Your program should read in that value and then output the membership fee for each year, beginning with the current year and ending with the last year of their membership. Generate the output in a table as shown below. Use a do-while loop to display the year and the membership fee for that year beginning with the current year. Use integer variables and start at year=0 for the current year. Hint 1: Create a double variable charges and initialize it with the first year membership fee. Inside the loop, update charges by 2%. Hint 2 Use setprecision (2), fixed and setw() options. Hint 3. There are 13 dashes in the table. When your programs input is as shown in Figure 1. your program should produce the output as shown in Figure 2. Figure 1: (input) 7 Figure 2 (output) Charges 2 3 250.50 255.51 260.62 265.83 271.15 276.57 282.10 287.75 5 1 // Ryan Dewey 2 // CS 1336. DMI 3/7 Lab 29 5 #include 6 #include 7 using namespace std; 8 int main() { int n, C=; cin>>n; double fee = 250.50; cout

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

The Database Relational Model A Retrospective Review And Analysis

Authors: C. J. Date

1st Edition

0201612941, 978-0201612943

More Books

Students also viewed these Databases questions

Question

What is topology? Explain with examples

Answered: 1 week ago

Question

What is linear transformation? Define with example

Answered: 1 week ago

Question

=+What is the nature of the unions in the particular country?

Answered: 1 week ago