Created
April 3, 2014 21:27
-
-
Save Apo45ty/9963255 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.in); | |
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