Question: Using c++ 1. Write a Binary Search function which searches for floating point num- bers in an array. The function should return the index of

Using c++  Using c++ 1. Write a Binary Search function which searches for

1. Write a Binary Search function which searches for floating point num- bers in an array. The function should return the index of the item found in the array, or the array length if the item is not found, as we did in class. The prototype of your function might look like: int index(float ItemToFind, float Array, int ArrayLength); 2. Write a function to print your array. 3. Write a program to ask for a number from the user, use your array print- ing function to print the array, then search for the requested number in your array using your Binary Search function. Test it by searching for A) an element which is in your array, and B) an element which is missing from your array

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!