Question: The following require using linear arrays/lists. For each, the input comes from 2-digit random integers. It is preferable the functions are implemented recursively. It is

The following require using linear arrays/lists. For each, the input comes from 2-digit random integers. It is preferable the functions are implemented recursively. It is up to you to implement the algorithm in Java or Python (preference) or C++. You do need to have a one main function that calls each function.

  1. Generate a list of 20 random integers.
  2. Print the maximum element.
  3. Print the maximum and minimum elements.
  4. Print the median element.
  5. Print the element that occurs most frequently.
  6. Print the sum of the squares of the elements.
  7. Print the average of the N elements.
  8. Print the element closest to 0.
  9. Print all the numbers greater than the average.
  10. Print the N elements in increasing order.
  11. Print the N elements in random order.
  12. Print histogram (with, say 10 bins of size 0.1).

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!