224k views
5 votes
A loop decision point for an algorithm consists of three features: an initial value, a set of actions to be performed, and a(n) ________. Select one: A. test condition B. documentation plan C. operator D. class

1 Answer

5 votes

Answer:

A test condition

Step-by-step explanation:

In programming, loops (for, while and do...while) will contain these three components. Consider the for statement below in java/c++/c language

for(int i = 0; i<10; i++) there are three components in there

int i = 0 //The Initial value

i<10 //This is the test condition

i++ // An action performed to change (increment) the value of i

A while statement also has these three components and without the test condition to be checked at each iteration, the code won't compile. The loop only continous as long as the condition remains true.

User Puigcerber
by
4.6k points