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 ifn...


9. Implement an array with values 1, 5, 14, 23, 45, 52, 58, 81, 82 91.<br>a) Create a getindex( function which does a linear search upon the array for<br>a specific value n. Return the index of n, or -1 ifn does not exist,<br>b) Print the array.<br>c) Search the array for the values 23, 58, 11, rint the reaults.<br>Qutpur Examnle<br>15 14 23 45 52 58 71 82 91<br>Number 23 is located at index<br>Number 58 As located at index C<br>Number 11 i looated at index -1<br>

Extracted text: 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 ifn does not exist, b) Print the array. c) Search the array for the values 23, 58, 11, rint the reaults. Qutpur Examnle 15 14 23 45 52 58 71 82 91 Number 23 is located at index Number 58 As located at index C Number 11 i looated at index -1

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here