Question: Show me the steps to solve This program will require three inputs from the user for the initial value of the home, the number of
Show me the steps to solve This program will require three inputs from the user for the initial value of the home, the number
of elapsed years, and the interest rate. This program will also have one output for the final value
of the home. Declare variables that meet the requirements for this program.
Prompt the user to input the initial value of the home, the number of elapsed years, and the
interest rate.
The number of elapsed years is expected to be an integer value, which will require a different
method to get the user input. As a hint for the method, if the double data type uses nextDouble,
what would the int data type use?
Since the user will input the interest rate as a percentage, you will need to convert this to a
decimal amount.
Calculate the final value of the home using the following formula for compound interest:
finalValue initial rateyears
Be careful about the order of operations. Addition should be performed first, then the power, and
then multiplication.
Display a message that includes the final value to the user.
Examples:
The following example assumes the user enters an initial value of a number of
elapsed years of and an interest rate of Keep in mind the rate will be converted to
for the calculation.
Please enter the initial value of the home:
Please enter the number of elapsed years:
Please enter the interest rate:
The final value of the home is $
The following example assumes the user enters an initial value of a number of
elapsed years of and an interest rate of Keep in mind the rate will be converted
to for the calculation.
Please enter the initial value of the home:
Please enter the number of elapsed years:
Please enter the interest rate:
The final value of the home is $
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
