START DECLARE num AS integer array of size 10 DECLARE count AS integer FOR count ← 1 TO 10 num[count] ← count * 2 ENDFOR STOP Trace table headed as follows: countnum
countnum
START DECLARE num1, num2 AS integer array of size 5 DECLARE count AS integer FOR count ← 1 TO 5 num1[count] ← count num2[count] ← num1[count] * num1[count] ENDFOR STOP
countnum1num
countnum1num
START DECLARE num1, num2, ans AS integer array of size 4 DECLARE count AS integer FOR count ← 1 TO 4 num1[count] ← count num2[count] ← count + count ans [count] ← num1[count] + num2[count] ENDFOR STOP
countnum1num2ans
START DECLARE SIZE AS constant integer with value 7 DECLARE num1 AS integer array of size SIZE DECLARE count AS integer FOR count ← 1 TO SIZE IF count MOD 2 == 0 THEN num1[count] ← count * 2 ELSE num1[count] ← count * 3 ENDIF ENDFOR STOP
SIZEcountnum
START DECLARE SIZE AS constant integer with value 4 DECLARE cost AS integer array of size SIZE DECLARE discount AS real array of size SIZE DECLARE count AS integer FOR count ← 1 TO SIZE discount[count] = cost[count] * (10/100) ENDFOR STOP Cost will have the values , 5, 10, and 60
Someone writes answer on the board.