Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Watson Watson

5th Edition

0471715360, 978-0471715368

More Books

Students also viewed these Databases questions

Question

LO3 Name the seven categories of HR functions.

Answered: 1 week ago

Question

LO1 Understand human resource management and define human capital.

Answered: 1 week ago