Advertisement
Mishakis

Grade

Apr 16th, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Misho {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.  
  7.         double a = Double.parseDouble(scanner.nextLine());
  8.  
  9.         if (a >= 5.5 && a <= 6.0) {
  10.             System.out.println("Excellent!");
  11.         } else if (a > 6 || a<2) {
  12.             System.out.println("Not a grade");
  13.         }else{
  14.             System.out.println("Not excellent.");
  15.         }
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement