Write a C++ program that calculates and displays the yearly amount available if RM1000 is invested in a bank account for 10 years. Your program should display the amounts available for interest rates from 6 to 12%, inclusive, in 1% increments. Use a nested loop, with outer loop having a fixed count of 7 and the inner loop a fixed count of 10. The 1st iteration of the outer loop should use an interest rate of 6% and display the amount money available at the end of the 1st 10 years. In each subsequent pass through the outer loop, the interst rate should be increased by 1%. Use relationship that the money available at the end of each year equals the amount of money in the account at the start of the year plus the interest rate times the amount available at the start of the year.
All 3 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.