ofekkfir

exercise 8

Oct 24th, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1. import java.util.*;
  2. public class targil8
  3. {
  4.     static Scanner reader = new Scanner(System.in);
  5.  
  6.     /**
  7.      * @param args
  8.      */
  9.     public static void main(String[] args)
  10.     {
  11.         int gr;
  12.         System.out.println ("Enter your grade" );
  13.         gr = reader.nextInt();
  14.         if (gr<=100)
  15.         {
  16.             if (gr>=90)
  17.             {
  18.                 System.out.println ("excellent");
  19.             }
  20.            
  21.         }
  22.         if (gr<=89)
  23.         {
  24.             if (gr>=80)
  25.             {
  26.                 System.out.println ("good");
  27.             }
  28.            
  29.         }
  30.         if (gr<=79)
  31.         {
  32.             if (gr>=60)
  33.             {
  34.                 System.out.println ("nice");
  35.             }
  36.            
  37.         }
  38.         if (gr<=59)
  39.         {
  40.             if (gr>=0)
  41.             {
  42.                 System.out.println ("??");
  43.             }
  44.            
  45.         }
  46.         }
  47.     }
Advertisement
Add Comment
Please, Sign In to add comment