QUOTE(julia231 @ 21 Aug, 2008 - 02:56 AM)

i still dont realli understand what you mean ?
A for loop just means that as long as the condition in the for loop is true, keep on doing whatever is in the statment(s) part of the for loop.
So...
as long as i is less or equal to ten, it will keep printing your cout statement.
i++ means add one to i each time.
So...
i starts out with a value of 1, and each time the for loop iterates it adds one to i, so the next time the for loop iterates, i will be 2, then it will be 3, etc. and the loop will continue until the condition (i<=10) is no longer true.
%d within the quotes will cause whatever follows the quote to be printed in place of the %d.
So...
i,bal*i means that the value of i, then the value of bal*i will be printed in place of the %d's in the quotes, each time your loop iterates, so the first time the loop iterates 300 will be printed, then the next time bal*i will be 600, since i is now 2, and it continues until the condition in the for loop is no longer true.
I think it's a good idea, as your instructions point out, to change the data type of balance to a float (you could use double but a float will probably work just as well, and it it smaller than a double). An int won't allow you to use decimals, so a float or double is better when dealing with money.
Does that help?
This post has been edited by OliveOyl3471: 21 Aug, 2008 - 04:29 AM