199k views
4 votes
Write a program that takes the account's present value, monthly interest rate, and the number of months that the money will be left in the account as three inputs from the user. The program should pass these values to a function thatreturns the future value of the account, after the specified number of months. The program should print the account's future value.

User Cheny
by
5.4k points

1 Answer

1 vote

Answer:

Assuming this is going to de made with python:

def main():

currentValue = float(input("Current value of account: "))

monthlyInterestRate = float(input("Monthly interest rate: "))

monthsToWait = int(input("Amount of months the money will be left in the account: "))

monthlyInterestRateToPercent = monthlyInterestRate / 100

futureValue = float(round((currentValue + currentValue * monthlyInterestRateToPercent * monthsToWait), 2))

print("The future value of this account will be " + str(futureValue))

main()

Step-by-step explanation:

Hope this helped. Also, if this is incorrect please tell me what needs to be added so I can add it for future viewers. Have a good day :)

User Dvsakgec
by
6.4k points