News
a while loop is used when the number of iterations is uncertain. Note: The if statement is like a single iteration of a loop; it is used to trigger a reaction to certain conditions, or respond to an ...
set the total to 0 set more numbers to ‘yes’ while more ... at the end of the loop is ‘No’, ie it will continue to iterate WHILE there are more numbers to add. A condition-controlled ...
If the condition is never met, then the program loops infinitely. Consider this simple algorithm to count up in twos from one to a hundred: the variable ‘count’ is set to 1 the ‘while ...
Results that may be inaccessible to you are currently showing.
Hide inaccessible results