A good answer might be:
count is 13 count is 14 count is 15 count is 16 count is 17 . . . . and so on without end |
Infinite LoopIt is possible (and common!) to accidently create a counting loop that will never end. In the above example, this happened because the variable decrement had the value minus one. So the statement
actually added one to count.
So count kept getting larger and larger, never reaching the zero that the
condition part was looking for:
Such loops are called infinite loops,
or non-terminating loops and are sometimes
easy to overlook when you are programming.
Here is another program fragment:
|
QUESTION 9:What relational operator should be used so that the program fragment prints out the integers 20 down to and including 11 ? Click Here after you have answered the question |