Advertisement
myrdok123

03. Passed or Failed

May 15th, 2024
607
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. package ProgramingBasicsOverview;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class P03_PassedOrFailed {
  6.  
  7.     public static void main(String[] args) {
  8.  
  9.         Scanner scanner = new Scanner(System.in);
  10.  
  11.         double grade = Double.parseDouble(scanner.nextLine());
  12.  
  13.         if (grade >= 3.0){
  14.             System.out.println("Passed!");
  15.         }else {
  16.             System.out.println("Failed!");
  17.         }
  18.     }
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement