Computer Science, asked by Tanmaymondal6672, 4 months ago

GPA Calculation Ranveer is an engineering student. He wants to calculate his GPA (Grade Point Average) scored in current semester. Consider the credit point of each subject is 3. Help him by writing a Java program to calculate GPA by storing the details of grade scored in each subject of a semester as a List.

Answers

Answered by dreamrob
0

Program in C++

import java.util.*;

public class MyClass

{

   public static void main(String args[])

   {

       Scanner Sc = new Scanner(System.in);

       int n;

       System.out.print("Enter total number of subjects : ");

       n = Sc.nextInt();

       double Total = 0.0;

       for(int i = 1 ; i <= n ; i++)

       {

           System.out.print("Enter grade point : ");

           int grade = Sc.nextInt();

           Total = Total + grade;

       }

       System.out.print("GPA = " + (Total / (3*n)));

   }

}

Similar questions