Question: C++ Having Trouble converting this linear search pseudocode. Start num array [6] = 115, 110, 215, 305, 410, 516 maxNumElements = 6 bolean elementFound =
C++ Having Trouble converting this linear search pseudocode.
Start num array [6] = 115, 110, 215, 305, 410, 516 maxNumElements = 6 bolean elementFound = false num inputValue output Please Enter a value input inputValue index = 0 WHILE (NOT elementFound ) AND (index <= max_num_elements IF array (index) ==inputValue THEN Set elementFound to true ELSE index = index +1 ENDIF ENDWHILE IF elementFound THEN Print value found was, array (index), at index, index ELSE Print value not found,inputValue ENDIF END
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
