Advertisement
Shavit

Course Acceptance

Oct 15th, 2013
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.54 KB | None | 0 0
  1. // Shavit Borisov
  2. // CW
  3.  
  4. import java.util.Scanner;
  5.  
  6. public class CourseAcceptance {
  7.  
  8.     public static void main(String[] args)
  9.    
  10.     {
  11.         Scanner in = new Scanner (System.in);
  12.        
  13.         float grade;
  14.         boolean approval;
  15.        
  16.         System.out.println("Enter your course grade:");
  17.             grade = in.nextFloat();
  18.        
  19.         System.out.println("Did you get the Dean's approval?");
  20.             approval = in.nextBoolean();
  21.        
  22.         if ((grade > 75) || (approval))
  23.             System.out.println("Accepted");
  24.         else
  25.             System.out.println("Not accepted");
  26.        
  27.         in.close();
  28.     }
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement