Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The following pseudocode is not working properly. The message should display fiv

ID: 3687490 • Letter: T

Question

The following pseudocode is not working properly. The message should display five times. This is not working because the programmer made which common loop mistake?

   Declarations
     num count
     string message = ”Good”
   while count < 5
      output message
      count = count + 1
   endwhile

a. Neglecting to initialize the loop control variable
b. Neglecting to alter the loop control variable
c. Using the wrong comparison with the loop control variable
d. Including statements inside the loop that belong outside the loop

Explanation / Answer

a. Neglecting to initialize the loop control variable

make  count=0