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.
- Generate a list of 20 random integers.
- Print the maximum element.
- Print the maximum and minimum elements.
- Print the median element.
- Print the element that occurs most frequently.
- Print the sum of the squares of the elements.
- Print the average of the N elements.
- Print the element closest to 0.
- Print all the numbers greater than the average.
- Print the N elements in increasing order.
- Print the N elements in random order.
- Print histogram (with, say 10 bins of size 0.1).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
