percentage of student__ using if / else if / else

PHOTO EMBED

Mon Apr 03 2023 14:33:54 GMT+0000 (Coordinated Universal Time)

Saved by @Mohamedshariif #java

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!: ");
        }
        
    }
}
content_copyCOPY