0

Maximum grade of students

I need to calculate the maximum and the minimum grade

2nd Dec 2019, 9:36 PM
Ahmed Arafa
Ahmed Arafa - avatar
2 Answers
0
import java.util.Scanner; public class Main { public static void main(String[] args){ System.out.println("**********************************************************"); Scanner input = new Scanner(System.in); char grade; int a; int smaller = 0; double sum=0, average; System.out.print("enter the number of students : "); a= input.nextInt(); String [] student_name = new String [a] ; double [] student_score = new double[a ] ; double min = student_score[0]; double max = student_score[0] ; System.out.println("**********************************************************"); for (int i=0; i <a; i++) { System.out.print("enter the student name : " ); student_name[i] = input.next(); System.out.print("enter the student score : "); student_score[i] = input.nextInt(); } System.out.println("**************************** student inf ******************************"); for (int j = 0 ; j<a;j++)
2nd Dec 2019, 9:36 PM
Ahmed Arafa
Ahmed Arafa - avatar