Write a program in java to store the computer marks of 75 students and find out the position of the highest and lowest marks.
Answers
Answered by
0
Answer:
import java.util.*;
class Brainly {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
ArrayList<Integer> list = new ArrayList<Integer>();
System.out.println("Enter the marks of all 75 students:");
for(int i = 0; i < 75; i++){
list.add(sc.nextInt());
}
int max = Collections.max(list);
int min = Collections.min(list);
System.out.println(list.indexOf(max));
System.out.println(list.indexOf(min));
}
}
Explanation:
Similar questions
Music,
6 hours ago
Art,
6 hours ago
Physics,
6 hours ago
English,
11 hours ago
CBSE BOARD XII,
11 hours ago