Preview:
package com.mycompany.java_quiz_app;

import java.util.Scanner;

public class Java_Quiz_App {

    public static void main(String[] args) {
        
        Scanner scanner = new Scanner(System.in);
        System.out.println("what is the percent did you earn: ");
        int percent = scanner.nextInt();
        
        if(percent >=90)
        {
            System.out.println("You got an A:");
        }
        else if(percent >=80)
        {
            System.out.println("You got a B:");
        }
        else if(percent >=60)
        {
            System.out.println("You got a C:");
        }
        else if(percent >=50)
        {
            System.out.println("You got a D:");
        }
        else
        {
            System.out.println("You got an F!: ");
        }
        
    }
}
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