/**
 * GradeAssignerIncorrect.java
 *
 * Computer Science S-111
 * 
 * This program has a logic error.  Can you find it?
 *
 * In addition, there is a compile-time error that stems from the
 * fact that the compiler can't be certain that grade will be assigned
 * a value.
 */

import java.util.*;

public class GradeAssignerIncorrect {
    public static void main(String[] args) {
        Scanner console = new Scanner(System.in);

        System.out.print("Enter the student's score: ");
        int score = console.nextInt();

        String grade;
        if (score >= 90) {
            grade = "A";
        }
        if (score >= 80) {
            grade = "B";
        }
        if (score >= 70) {
            grade = "C";
        }
        if (score >= 60) {
            grade = "D";
        }
        if (score < 60) {
            grade = "F"; 
        }
        
        System.out.println("The grade is: " + grade);
    }
}
