Show Para
Directions (Q. Nos. 29-30) Based the algorithm given below.
Step 0 : START
Step 1: N : = 0, C : = 0, FLAG : = FALSE
Step 2 : INPUT TABLE A [1. .10]
Step 3 : ForI - 1 to 10 Do
if (A [I ] - 1) then
N : = N + 1
If (FLAG = FALSE) THEN
C = I
FLAG = TRUE
END IF
END IF
END FOR
Step 4 : OUTPUT N, C
Step 5 : END
Given that A [1.10] = 7, 0, 0, 1,1,0, 3, 1, 9, 10
Step 0 : START
Step 1: N : = 0, C : = 0, FLAG : = FALSE
Step 2 : INPUT TABLE A [1. .10]
Step 3 : For
If (FLAG = FALSE) THEN
C = I
FLAG = TRUE
END IF
Step 4 : OUTPUT N, C
Step 5 : END
Given that A [1.10] = 7, 0, 0, 1,1,0, 3, 1, 9, 10
Go to Question: