//Ryan Shahriyarpour CS1A Carl Argila CH5 HW Q:4
//
/*****************************************************************************
*
* Membership Fees Increase
*
*********************
*
* A country club currently charges $2,500 per year for membership and will
* increase its membership fee by 4% each year for the next six years.
* This program displays the projected rates for the next six years.
*
* INPUT
* None (fixed values used)
*
* OUTPUT
* Table showing year and projected membership fees
*
****************************************************************************/
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
const double STARTING_FEE = 2500.0;
const double INCREASE_RATE = 0.04;
double fee = STARTING_FEE;
cout << "Year\t\tMembership Fee\n";
cout << "---------------------------------------\n";
// Display fees for the next 6 years
for (int year = 1; year <= 6; year++)
{
fee = fee * (1 + INCREASE_RATE);
cout << year << "\t\t$" << fixed << setprecision(2) << fee << endl;
}
return 0;
}