Question: solve it in c++ 9. Implement an array with values 1, 5, 14, 23, 45, 52, 58, 81, 82 91. a) Create a getIndex() function

solve it in c++ 9. Implement an array with values 1, 5,solve it in c++

9. Implement an array with values 1, 5, 14, 23, 45, 52, 58, 81, 82 91. a) Create a getIndex() function which does a linear search upon the array for a specific value n. Return the index of n, or -1 if n does not exist. b) Print the array. c) Search the array for the values 23, 58, 11. Print the results. Output Example 1 5 14 23 45 52 58 71 82 91 Number 23 is located at index 3 Number 58 is located at index 6 Number 11 is located at index -1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!