Write a program called CheckPass which read the mark from u
. Write a program called CheckPass which read the mark from user in double and prints \"PASS\" if the mark is more than or equal to 60; or prints \"FAIL\" otherwise.
Solution
CheckPass.java
import java.util.Scanner;
 public class CheckPass {
  
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println(\"Enter the mark: \");
        double mark = scan.nextDouble();
        if(mark >= 60){
            System.out.println(\"PASS\");
        }
        else{
            System.out.println(\"FAIL\");
        }
    }
}
Output:
Enter the mark:
 75
 PASS

