Question: 1) Develop a program to calculate the interest. Every month the interest is balance*(1+Rate/12). For example, if the starting balance is $1000 and the annual
1) Develop a program to calculate the interest. Every month the interest is balance*(1+Rate/12). For example, if the starting balance is $1000 and the annual interest rate is 3%, the monthly interest is 1000*(1+0.03/12). So, after the first month, the balance becomes 1000*(1+0.03/12)=1002.5. Next month, the balance starts at $1002.5, the monthly interest is 1002.5*(1+0.03/12), which is 1005.01. In other words, every month the interest is added to the balance, making your monthly interest more and more. To calculate your annual interest income (which is called yield), you need to do balance=balance*(1+rate/12) 12 times.
You are expected to use while loop (not for loop) to help the user to figure out what the final balance is after 12 months. In other words, use a while loop to do the balance=balance*(1+rate/12) 12 times. The program should ask the user to enter the initial balance (like you want to save $1000 into your account) and the annual interest rate. The program should display "Your balance after 12 month is $xxxx.xx"
2. After step (1) is done, your program ask the user "Continue? y/n". If the user answers 'y', the program runs step (1) again. It will keep running step (1) until the user answers 'n'. (Hint: this is a while loop again. Step (1) is within this loop, so step (1) can run again and again.
Need this in C++ not in PYTHON
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
