It doesn't matter if tin the sample program we discuss today you use; DO-WHILE loop or a simple While LOOP
It looks like this:
current balance is a double.
current_balance=50;
while( balance<=100)
{ interest= current_balance * 0.02;
current_balance= interest + current_balance;
balance= current_balance;
}
This is simple example of the main body of the program which executes....The operation...rememember to put a counter variable at the end of the while loop to know hom many month is going to pass aster you reach top....($100)....
Enjoy....I did it before teacher run the progrmas......