Question: Here's the code that needed an adjustment. Future Value Application var futureValue; // get user entries var investment = prompt(Enter investment amount as xxxxx.xx, 10000);

 Here's the code that needed an adjustment. Future Value Application var

Here's the code that needed an adjustment.

Future Value Application

var futureValue;

// get user entries

var investment = prompt("Enter investment amount as xxxxx.xx", 10000);

investment = parseFloat(investment);

var rate = prompt("Enter interest rate as xx.x", 7.5);

rate = parseFloat(rate);

var years = prompt("Enter number of years", 10);

years = parseInt(years);

// calulate future value

futureValue = investment;

for (var i = 1; i

futureValue = futureValue + (futureValue * rate / 100);

}

futureValue = parseInt(futureValue);

document.write("Investment amount = " + investment);

document.write(" Interest rate = " + rate);

document.write(" Years = " + years);

document.write(" Future Value is " + futureValue + " ");

Thanks for using the Future Value application.

In this application, you'l make a quick enhancement that shows not only the future value when interest is compounded yearly, but also when it's compounded ser should look like this Future Value with Yearly Interest Investment amount10000 Interest rate 7.5 Years 10 Future Value is 20610 Future Value with Monthly Interest Investment amount = 10000 Interest rate = 7.5 Years = 10 Future Value is 21120 Thanks for using the Future Value application. Estimated time: 15-20 minutes. 1. Open this file: exercises shortch03\future value.html - 2. Run the application, review its code, note that it is just like the one in the book and note that the interest is calculated each year. Add the code for calculating the future value when interest is calculated each month. Then, add the code for the displaying the results, as shown above. 3

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!