Download <p align="center">Compund Interest</p>
About
-
Get the values of the yearly interest rate, the amount to be interested monthly and the tenor.
-
Calculate the monthly interest rate in percentage.
We have the opening and closing values.
The opening value starts at 0.
-
Loop, (using a for loop) through the number of months and calculate the interest on both the
fixed amount to be invested monthly + opening value.
The closing value thus equals the interest on the amount to be invested + interest on the opening
value (which is the closing value of the previous day).
As you loop, increment and get the needed values - interest at the said month and total amount invested.
How to Use
-
Git clone and composer install
-
Run php artisan serve
-
Visit /exercise to test code.
|