Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Your program should read a le of integers into an array. The rst line of the le

ID: 3634777 • Letter: Y

Question

Your program should read a le of integers into an
array. The rst line of the le gives how many integers are stored in the
le.
(a) You should calculate and display
i. the sum of the integers
ii. the maximum
iii. the minimum
iv. the average
For example if the le is:
4
33
5
77
0
then you would display
sum: 119
max: 77
min: 0
average: 29.7
[45
1414
661
374
111
178
979
869
805
710
1358
1068
1299
68
70
268
1006
1394
1343
924
17
322
398
628
23
103
997
1083
487
686
659
1189
690
552
293
323
48
847
1384
115
1231
1089
78
801
1185
889

Explanation / Answer

import java.util.Scanner; public class numberAnalysis { /** * @param args */ public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("How many number would you like to enter?"); int size = sc.nextInt(); int[]array = new int[size]; for(int i =0; i