Question: 1) 2) What control does a WHILE statement normally allow? It allows a set of actions to be carried out if a condition is TRUE.
1)
2)
What control does a WHILE statement normally allow? It allows a set of actions to be carried out if a condition is TRUE. The ELSE part allows a different set of actions to be carried out if the condition is FALSE If allows a set of actions to be carried out a set number of times. It allows a set of actions to be carried out until a condition becomes FALSE. It allows different things to be done dependent on the value of a variable. This allows many different sets of actions to correspond to at least as many values of the variable. It allows one action to be done if a condition is TRUE and nothing can be done if the condition is FALSE. In which of the following cases should a WHILE loop be used in preference to other control statements? It is necessary to repeat a section of code until the value of a variable drops below a specified number. A block of code has to be repeated for each entry in an array. A block of code has to be executed once subject to a condition being satisfied. A block of code has always got to be executed. A block of code has to be executed 10 times
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
