Code is copied!
Program to input marks and print the grade according to the given criteria JAVA
Write a Program to input marks and print the grade according to the given criteria.
import java.util.*; class grades { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int marks = sc.nextInt(); if(marks>80) System.out.println("A grade"); else if(marks>=60 && marks<=80) System.out.println("B grade"); else if(marks>=50 && marks < 60) System.out.println("C grade"); else System.out.println("D grade"); } }