Hi I have only been learning C++ for a couple of weeks I need help on doing calculations with variables.
It is an exercise I have been given in class and I am now working on at home but I am not outputting the correct answers.
The question is:
A student is allocating his allowance for the 16 weeks of a course over the following areas:
Accommodation - total amount
Materials - one off payment
Food - 60% of remaining allowance
Entertainment - 40% of remaining allowance
Output a breakdown of the availiable money for the student ensuring that the food and entertainment is expressed as a weekly value.
I am getting the correct answer for the total amount for the accomadation but not for the remaining allowance for the Food & Entertainment. Here is the code I have.