Write a program that gets 4 grades (from 100) from the user. Itwill then calculate the student GPA (from 4) and will let thestudent know if they made it to the Dean’s list (GPA more than3.0). Even if they didn’t make it, the program should show the GPAand a proper message.
Solution
import java.util.*;
class Final {
public static void main(String[] args) {
int marks[] = new int[4];
int i,n;
float sum=0;
Scanner sc = new Scanner(System.in);
System.out.print(“Enter number of Students: “);
n=sc.nextInt();
for(i=0;i<n;i++)
{
System.out.print(“Student “+(i+1)+”‘s GPA: “);
marks[i]=sc.nextInt();
sum+=marks[i];
}
float gpa = (sum/4)/10;
if(gpa>3.0)
System.out.print(“Student has GPA more