Write a program that will generate a list of 1000 random numbers with values between 0 and 9999. Sort the list into order using any sort method you prefer. Then it should prompt for a value and perform a binary search of the list for that value.
After the search completes, the program should print the number of times through the search loop and the location of the value in the list if found or the message "Not Found" if it is not in the list.
After printing the results, ask if another search should be performed. If so, prompt for a new value to search for and use the SAME list. Do not generate a new list of values.
Hand in a copy of the program and a sample execution showing the binary search results.
SAMPLE EXECUTION:
WHAT NUMBER DO YOU WANT TO SEARCH FOR ? 1722
Number of times through the search loop: 9
That number was found at position: 2145
DO YOU WANT TO SEARCH AGAIN (Y OR N) ? Y
WHAT NUMBER DO YOU WANT TO SEARCH FOR ? 5126
Number of times through the search loop: 10
That number was NOT found.
DO YOU WANT TO SEARCH AGAIN (Y OR N) ? N