import java.util.*;
public class Grade {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter marks:");
int marks = sc.nextInt();
if (marks >= 90 && marks < 100)
System.out.println("Grade: S");
else if (marks >= 80 && marks < 90)
System.out.println("Grade: A");
else
System.out.println("Grade: B");
}
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter