Setpoint search algorithm
In order to find an element equal to the given value
X
, it is necessary to look through all the elements of the array from the first to the last. As soon as an element equal to the given value
X
is found, the search must be completed and display the result.
The easiest way to implement this algorithm is with the
while
loop operator. Try adding a condition yourself in the
while
operator.