Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Branson Grading Scale
- *
- * Jimmy Nguyen
- * 9/19/14
- */
- public class BransonGradingScale
- {
- public static void main(String[] args)
- {
- KeyBoardReader kb = new KeyBoardReader();
- System.out.print("Please enter the numberical average of a class: ");
- int grade = kb.getInt();
- if ((grade > 0) && (grade < 100))
- System.out.println("This is an invalid input");
- else if ((grade >= 96) && (grade <= 100))
- System.out.println("You have an A+ in the class.");
- else if ((grade >= 92) && (grade <=95))
- System.out.println("You have an A in the class.");
- else if ((grade >= 88) && (grade <= 91))
- System.out.println("You have an A- in the class.");
- else if ((grade >= 84) && (grade <= 87))
- System.out.println("You have a B+ in the class.");
- else if ((grade >= 80) && (grade <= 83))
- System.out.println("You have a B in the class.");
- else if ((grade >= 77) && (grade <= 79))
- System.out.println("You have a B- in the class.");
- else if ((grade >= 74) && (grade <= 76))
- System.out.println("You have a C+ in the class.");
- else if ((grade >= 71) && (grade <= 73))
- System.out.println("You have a C in the class.");
- else if ((grade >= 67) && (grade <= 70))
- System.out.println("You have a C- in the class.");
- else if ((grade >= 60) && (grade <= 66))
- System.out.println("You have a D in the class.");
- else if ((grade >= 0) && (grade < 60))
- System.out.println("You have an F in the class.");
- System.out.println("Thank you for checking your grade. Good bye.");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement