Write a java program that reads a student’s mark for a single subject, and prints out “Pass” if the student got more than 50, and “You shall not pass” otherwise.
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package BASICJAVA;
import java.util.Scanner;
/**
*
* @author ABIR
*/
public class Pass_over_50 {
public static void main(String[]args){
Scanner abir =new Scanner(System.in);
System.out.println("Enter your number");
int number=abir.nextInt();
if(number>50){
System.out.println("Pass the exam");
}else{
System.out.println("You did not Pass");
}
}
}