The second task of the program is to calculate/display a possible investment. First, the program should ask
the amount of money that he/she requires (on an average) per week as living expenditure. You are to assume this expenditure value does not change for the individual over time. (the amount needs to be a positive number and different from zero; if not, the program will show an error message and ask the salary again)
On the basis of this information the program should advise the user whether or not the amount he/she is earning each week is sufficient to cover his/her weekly expenses. If the user earns less than the amount that is required to live, you should show a warning message and ask if the user would like to enter a new amount or terminate the program.
If an amount is sufficient to cover his/her weekly expenses, the program should ask if the user would like to invest some money. If yes, the program should ask
Investment value - the amount of money that he/she would like to invest per week (it is necessary to verify if this amount is feasible. If not, show an error message and ask again)
Interest rate - the interest rate of the investment account per annum (the interest rate needs to be between 1% and 100%; otherwise the program will show an error message and ask the user for the interest rate again)
Investment length - number of weeks that the user will invest the money (it needs to be a positive number and different from zero; otherwise the program will show an error message and ask the number of weeks again)
The program is then expected to display:
a table with details of the investment at four week intervals for the length of the investment. For the purposes of this assignment you will assume that interest is only applied at the end of a complete four week period, see the example below.