Question: in C++ Create a user-defined function, search Me(), that searches for a number in an double array. 1. The function takes three parameters: double array,
in C++
Create a user-defined function, search Me(), that searches for a number in an double array. 1. The function takes three parameters: double array, int array Size, and double number 2. The function loops through the array. If number is found in the array, return the matched element's position (index) in the array. Otherwise, return -1. 3. When a match is found in the array, the loop should be terminated at the time --- no need to continue the loop 4. If no match is found the function should display all elements in the array, as well as the search number. 5. Ensure the function not to be able to modify any data in the array. Please write the function definition (including function heading and function body) in the Answer area. No need to provide the entire program. (Try to preserve the indentation format of your code.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
