There are multiple errors in the pseudocode in Figure 1.
Write the correct code for line 08
Figure 1
| Line | Pseudocode |
|---|---|
| 01 | |
| 02 | SET temps TO [12, -3, 15, 0, -1, 14, 2] |
| 03 | |
| 04 | SET freezing TO 0 |
| 05 | SET standard TO 0 |
| 06 | SET index TO 0 |
| 07 | |
| 08 | WHILE NOT (index > LENGTH(temps)) DO |
| 09 | |
| 10 | IF temps[index] < 0 THEN |
| 11 | SET freezing TO temps[index] |
| 12 | ELSE |
| 13 | IF temps[index] >= 0 THEN |
| 14 | SET standard TO standard + 1 |
| 15 | END IF |
| 16 | END IF |
| 17 | |
| 18 | SET index TO index + 1 |
| 19 | |
| 20 | END WHILE |
| 21 | |
| 22 | SEND "Freezing: " & freezing TO DISPLAY |
| 23 | SEND "Total: " & (freezing + standard) TO DISPLAY |