Maximum grade of students | Sololearn: Learn to code for FREE!

0

Maximum grade of students

I need to calculate the maximum and the minimum grade

12/2/2019 9:36:27 PM

Ahmed Arafa

2 Answers

New Answer

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++)

0

https://www.geeksforgeeks.org/find-max-min-value-array-primitives-using-java/