Y
Y
yamudaqq2021-01-23 00:29:46
block diagram
yamudaqq, 2021-01-23 00:29:46

What will be the result of the flowchart?

What will happen as a result if 1, 1, 1, 0, 0, 1, 0, 1, 1 is passed to the input
600b42fd1dfc3779912467.png
? next loop) check x[i] = 1? How can x[i] be equal to one if it's an array of numbers?
I would be grateful for an answer and an explanation.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wataru, 2021-01-23
@yamudaqq

The first loop reads the input into the array x. Your "1, 1, 1, 0, 0, 1, 0, 1, 1" will be in this array (you just need to enter 9 as n first).
Therefore, testing for 1 makes sense and will return true for the first three iterations, but not for the next two, and so on.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question