' get the starting balance ' DO WHILE user does not want to quit ' handle one transaction ask if user wants to quit LOOP ' END
Now we must deal with the details of getting the loop to work correctly. The loop does "some task" over and over for as long as the user wants. It doesn't really matter too much what the task is. We can concentrate on getting the loop to work, and mostly ignore the task.
Here are four pieces needed to make the loop work:
QUIT$
is a string variable that can contain a value like "Y" or "N".
The relational expression QUIT$ = "N"
Fit the four pieces of the loop into the framework. Do this by making a selection of the statements in each box.