Question: Write a script file that will compute the growth in a savings account at the end of every year for n-years. The script should prompt

 Write a script file that will compute the growth in a

Write a script file that will compute the growth in a savings account at the end of every year for n-years. The script should prompt the user to input: 'the initial account balance:' 'the annual interest rate:' 'the investment duration in years:' Use the formula B = B_0 (1+r)" where B_0 is the initial balance, r is the annual interest rate as a fraction, n is the number of years, B is the future value of the investment. The script should display a 2-dimensional array with n-rows and two columns: The first column should display the years from 0 to n. The second column should display the account balance at the end of each corresponding year. Test your program with $100 as the input for the initial balance; and, 6.5% as the input interest rate. The output should look like this: 0.0000 100.0000 1.0000 106.5000 2.0000 113.4225 3.0000 120.7950 4.0000 128.6466 5.0000 137.008

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!