Program: #arrays Due: 04/28/02019 Points: 6


Create an array of type int having a length of 16.

Populate the array with random integers that are in the interval zero to 42 (inclusive).

Print contents of the the array to the standard output stream. The numbers should be separated by two spaces and at most five numbers should be printed per line.

Enter into a loop that prompts the user to enter a number between 0 and 42, inclusive. Terminate the loop if -1 is entered. Use a "linear search" algorithm to find the number in the array printing either a "number found" or "number not found" message.

Keep track of the total number of searches performed and the number that were successful. Print the following message prior to exiting the program

   X of Y searches (nn.n%) were successful.

      Where  X  is the number of successful searches,  
      Y  is the total number of searches, and  nn.n  
      is the percentage of successful searches.