Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class P2
  3. {
  4. public static void main(String [] args)
  5. {
  6. int score = 0;
  7. Scanner in = new Scanner(System.in);
  8. System.out.print("Enter your score: ");
  9. score = in.nextInt();
  10. if (score < 40)
  11. System.out.println("F");
  12. else if (score >= 40 || score < 50)
  13. System.out.println("D");
  14. else if (score >= 50 || score < 60)
  15. System.out.println("C");
  16. else if (score >= 60 || score < 70)
  17. System.out.println("B");
  18. else if (score >= 70 || score < 80)
  19. System.out.println("B+");
  20. else
  21. System.out.println("A");
  22.  
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement