Part two:
Write a method to print the array in reverse order.
Part three
Write a method to print out the second largest element in the array.
Part four
Write a method to print the average of the array.
Part five
Write a method to search the array for an integer the user gives you.
Part six (a little harder)
Create a histogram according to your array data
If you array looks like this 1,2,3,1,2,3,3,2,1,1
Your histogram would look like this:
* ** *** * ** *** *** ** * * |
Part seven (they're getting harder):
Write a method to print the frequency of each integer in the array:
e.g.: If you array has the elements 2,3,2,4,2,4,2,5,4,5
You would print out:
The number 2 is in the array 4 times The number 3 is in the array 1 times The number 4 is in the array 3 times The number 5 is in the array 2 times |