Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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);

image text in transcribed

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

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

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

More Books

Students also viewed these Databases questions

Question

Describe ERP

Answered: 1 week ago

Question

What is the use of bootstrap program?

Answered: 1 week ago

Question

What is a process and process table?

Answered: 1 week ago

Question

What is Industrial Economics and Theory of Firm?

Answered: 1 week ago