// This program asks the user for their percentage in a course // and prints what letter grade they should receive. import java.util.*; public class CourseGrade { public static void main(String[] args) { Scanner console = new Scanner(System.in); System.out.print("Type your percentage: "); int percent = console.nextInt(); if (percent >= 90) { System.out.println("A"); } else if (percent >= 80) { System.out.println("B"); } else if (percent >= 70) { System.out.println("C"); } else if (percent >= 60) { System.out.println("D"); } else { System.out.println("F"); } } }