185k views
0 votes
If the value of f(x, y, z) is always an integer, which of the following conditions ensures that the loop below terminates?

while (f(x, y, z) < 100)
{

}

Question 11 options:

1)

x, y, and z are each increased during each iteration.

2)

The value of f(x, y, z) is increased during each iteration.

3)

x, y, and z are each decreased during each iteration

4)

The sum of x, y, and z is decreased during each iteration.

5)

The value of Math.pow (f(x, y, z), 2) is decreased during each iteration.

1 Answer

3 votes

Answer:

2)The value of f(x, y, z) is increased during each iteration.

Step-by-step explanation:

Because check statement in while loop is 'f(x,y,z)<100' and loop will terminate only when the value of f(x,y,z)' is greater than or equal to 100 and this will only when value of f(x, y, z) is increased during each iteration.

User Countryroadscat
by
7.0k points