Suppose you save $100 each month into a savings account with the annual interes rate5%.So, the monthly interest rate is after the first month,the value in the account becomes 100(1+0.00417)=100.4417
After the second month, the value in the account becomes (100+100.417)
(1+0.00417)=201.252
After the third month ,the valiue in the account becomes (100+201.252)*(1+0.00417)=302.507 and so on
Write a C++ program to display the account value after the sixth month.

100(1+0.00417)=100.4417

That is incorrect. 100 * 1.00417 = 100.417, not 100.4417.

In any event, just a simple loop will calculate the value after N number of months.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.