Write a class Stats that reads a count n, then n integers into an array, and prints:
Min: 3
Max: 21
Average: 9.75
Write the minimum and the maximum with your own loop — do not sort the array.
THINK FIRST·CODE LATER
Problem
Write a class Stats that reads a count n, then n integers into an array, and prints:
Min: 3
Max: 21
Average: 9.75
Write the minimum and the maximum with your own loop — do not sort the array.
Write it here or in your IDE, then paste it. Compile and test it yourself before comparing. Your code stays in your browser — it is never sent to or stored on the server.
Model solution