# 1 search benchmarks int array 20 78 45 33 1 6 41 99 54 73 28 101 60 21 82 11 15 5346813

1.       Search  Benchmarks

int array[20] = {78, 45, 33, 1, 6, 41, 99, 54, 73, 28, 101, 60, 21, 82, 11, 15, 654, 36, 52, 70};

Write a program that has an array of 20 integers. (You must use the above array.)   It should call a function that uses the linear search algorithm to locate one of the values. The function should keep a count of the number of comparisons it makes until it finds the value. The program then should call a function that uses the binary search algorithm to locate the same value. It should also keep count of the number of the comparisons it makes. Display these values on the screen.

2.       Sorting Orders

int first_array[8] = {13, 9, 36, 47, 3, 88, 7, 100};

int second_array[8] = {13, 9, 36, 47, 3, 88, 7, 100};

Write a program that uses two identical arrays of just eight integers.  (You must use the above arrays.) It should display the contents of the first array, then call a function to sort the array using an ascending order bubble sort modified to print out the array contents after each pass of the sort.  Next, the program should display the contents of the second array, then call a function to sort the array using an ascending order selection sort modified to print out the array contents after each pass of the sort.

3. Write a program that uses a structure to store the following weather data for a particular month:

Total Rainfall

High Temperature

Low Temperature

Average Temperature

The program should have an array of 12 structures to hold weather data for an entire year.  When the program runs, it should ask the user to enter data for each month.  (The average temperature should be calculated be calculated, using the high and low temperatures.)  Once the data is entered for all the months, the program should calculate and display the average monthly rainfall, the total rainfall for the year, the highest and lowest temperatures for the year (and the months they occurred in), and the average of all the monthly average temperatures.

Input Validation:  Only accept temperatures within the range between -100 and +140 degrees Fahrenheit.