array A = 1, 2, 7, -6, -3, 5, -1, 4, 6
read N
set I = 0
set J = 0
while I < N
if A[I] < 0
set J = A[I]
endif
set I = I + 1
endwhile
write J
The first line of the program declares and initializes an array with 9 elements as shown. The second line of the program reads an integer from the input and tores it in N. The rest of the program does some computation, and the last line of the program prints the value of the variable J to the output.
If the number 5 is provided as input to this program, what will the output of this program be?
Answers
Answered by
0
Answer:
i don't know this answers sorry
Answered by
0
Answer:
Ans: -3
Explanation:
#SPJ3
Attachments:
Similar questions