//Diego Martinez CSC5 Chapter 5, P.294,#5
/*******************************************************************************
* CALCULATE YEARLY MEMBERSHIP FEE INCREASE
* ______________________________________________________________________________
* This program calculates and displays how a country club’s membership fee is
* expected to increase over the next six years.
*
*
* Computation is based on the Formula:
* Initial Fee = 2500
* r = 0.04 (4% increase per year)
* n = number of years
* Fee after n years=2500×(1.04)^n
*______________________________________________________________________________
* INPUT
* Initial membership fee : $2500
* Annual increase rate : 4% (0.04)
* Number of years : 6
*
* OUTPUT
* The year number : (Year 1 through Year 6)
* The membership fee for that year after the 4% increase
*******************************************************************************/
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
float fee = 2500.0;
const float increaseRate = 0.04;
cout << fixed << setprecision(2);
for (int year = 1; year <= 6; year++) {
fee += fee * increaseRate;
cout << "Year " << year << ": $" << fee << endl;
}
return 0;
}