Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The pseudocode below calculates the future value of a fixed monthly investment. The user enters fixed monthly investment, yearly interest rate, and number of years

The pseudocode below calculates the future value of a fixed monthly investment. The user enters fixed monthly investment, yearly interest rate, and number of years invested. The program then calculates and displays the future value. Review the pseudocode and convert it to a java program named lab12.java.

start

num yearlyInterestRate num monthlyInterestRate num monthlyInvestmentAmount num years num months input monthlyInvestmentAmount input years input yearlyInterestRate months = years x 12; monthlyInterestRate = yearlyInterestRate / 12 / 100; futureValue = CalculateFutureValue(monthlyInvestmentAmount,monthlyInterestRate, months) print "Future Value $" , futureValue

stop

num CalculateFutureValue(num monthlyInvestment, num monthlyInterestRate, num months ) num futureValue = 0; num monthcount=0; while monthcount < months futureValue = (futureValue + monthlyInvestment) x (1 + monthlyInterestRate); monthcount = monthcount + 1; end while return futureValue;

Output sample Enter monthly investment amount: 100.0 Enter number of years: 15 Enter yearly interest rate: 4.5

Future Value $25737.62238457704

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

Temporal Databases Research And Practice Lncs 1399

Authors: Opher Etzion ,Sushil Jajodia ,Suryanarayana Sripada

1st Edition

3540645195, 978-3540645191

More Books

Students also viewed these Databases questions

Question

=+7 How has the COVID-19 pandemic impacted the operations of IHRM?

Answered: 1 week ago