@LinusH
Thank you for the reply. In the first program for instance, the rate was not divided by 12 unlike the second one, what does this imply? In some cases the rate was divided by 12 within the loop, for some other it was outside the loop, what difference will this make?
Secondly, where interest is calculated separately, we have capital+interest, in another program we have earned+capital+interest, earned being the accumulating variable in the sum statement.
In the last program, the interest was not calculated separately; Earned+(capital+earned)*rate.
Since each solution gives entirely different answers, it would mean they address different Questions, I'm trying to figure the sort of questions that apply to each program.
If I'm given a question on do loop, I won't be sure which method is correct because I don't get the logic.
Thank you.
... View more