Write a java program that reads a student’s mark for a single subject, and prints out the corresponding grade for that mark. The mark ranges and corresponding grades are shown in the table below.
Marks Grade 90 and above A 80-89 B 70-79 C 60-69 D 50-59 E Below 50 F
/*
* 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 Print_Garde_Accoriding_Marks {
public static void main(String[]args){
Scanner abir =new Scanner(System.in);
System.out.println("Enter your number");
int number=abir.nextInt();
if(number>=90 && number<=100){
System.out.println("A");
}else if(number>=80&&number<=89){
System.out.println("B");
}else if(number>=70&&number<=79){
System.out.println("C");
}else if(number>=60&&number<=69){
System.out.println("D");
}else if(number>=50&&number<=59){
System.out.println("E");
}else{
System.out.println("Faill");
}
}
}