Question
A bank offers the following saving scheme: Invest a fixed amount on the first of the month of each month for a set number of
A bank offers the following saving scheme: Invest a fixed amount on the first of the month of each month for a set number of years (2, 3 or 4). On the first of the month after your last installment get your money plus accrued interest. The bank quotes a yearly interest rate, but interest is calculated and compounded on a monthly basis. Three different interest rates are offered depending on the number of years the program is to run.
The following table lists the interest rates offered. Interest Rates For a period of two years 3.3% For a period of three years 3.5% For a period of four years 3.9%
Write a two-argument function DFV(Deposit,Years), that returns the future value of such an investment. Have the function return a zero (0) if the user inputs a negative amount for deposit or a period of years that is outside the offered range.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started