Skip to content

Instantly share code, notes, and snippets.

Created April 3, 2014 21:27
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
public class myGradeCalc{
public static void main(String[] args){
System.out.println("Welcome to the grade calculator, this program will can calculate the gradepoint average of 3 students.");
Scanner in = new Scanner(;
System.out.println("Please Enter Grade 1:");
int grade1 = in.nextInt();
System.out.println("Please Enter Grade 2:");
int grade2 = in.nextInt();
System.out.println("Please Enter Grade 3:");
int grade3 = in.nextInt();
int sum = grade1 + grade2 + grade3;
int average = sum / 3;
System.out.println("The grade point average of the whole class is " + average );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment