This is iteration, commonly confused with recursion. The state variable, "cash position" keeps getting updated.E Michael White wrote: To get back to the thread title, an example of recursion is :-
1.ECF realise they have a cash shortage.
2.ECF make decision to raise game fee or introduce other measures
3.Fewer people play chess as a result
4.ECF has another cash shortage
5 Go to 1
INT Game fee, cash position;
BOOL close;
WHILE cash position < ideal AND cash position != 0
Game fee = Game Fee + 10;
IF cash position = 0
ECF close;
ELSE cash position >= ideal
RETURN 0;