Advertisement
MoonCyde

Grading Program

Apr 27th, 2015
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.18 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package gradingapp;
  7. import java.util.Scanner;
  8. /**
  9.  *
  10.  * @author Jeffrey Eric Gutierrez @mariokart64.com
  11.  */
  12. public class GradingApp {
  13.  
  14.     /**
  15.      * @param args the command line arguments
  16.      */
  17.     public static void main(String[] args) {
  18.         Scanner sc = new Scanner (System.in);
  19.         System.out.println("Enter your score");
  20.         double score = sc.nextDouble();
  21.         if (score >= 90){
  22.             System.out.println("Score is A");
  23.         }
  24.         else
  25.             if(score >= 80 && score <90)
  26.                 System.out.println("Score is B");
  27.         else
  28.                 if(score >=70 && score <80)
  29.                     System.out.println("Score is C");
  30.         else
  31.                     if(score >=60 && score <70)
  32.                         System.out.println("Score is D");
  33.         else
  34.                         if(score <60)
  35.                             System.out.println("Score is F");
  36.        
  37.        
  38.                            
  39.            
  40.        
  41.     }
  42.  
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement