myrdok123

01. Excellent Result

Sep 20th, 2024 (edited)
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1. package ConditionalStatements;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class ExcellentResult_01 {
  6.     public static void main(String[] args) {
  7.         Scanner scanner = new Scanner(System.in);
  8.  
  9.         int grade = Integer.parseInt(scanner.nextLine());
  10.  
  11.         if (grade >= 5){
  12.             System.out.println("Excellent!");
  13.             System.out.println("You passed to next stage!");
  14.         }else {
  15.             System.out.println("Try again!");
  16.         }
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment