25. Why is the following loop an infinite loop given the code before and during
ID: 3706646 • Letter: 2
Question
25. Why is the following loop an infinite loop given the code before and during the loop? while t sx -1t 100 do z $ ( (z-1) ) x-s ( (x+Y)) X-s ( (x+2)) done a. Because X never changes so it will never reach 100 b. Because X increases and then decreases by the same amount each iteration so will never reach 100 by the time the loop condition is tested c. While X increases in each iteration, it never reaches 100 d. The loop is not an infinite loop at all e. The code contains errors because there are missing semicolonsExplanation / Answer
25)
answer: b
because x increases and then decreases by the same amount each iteration so will never reach 100 by the time the loop codition is tested