/*
 * GradeCalculator.java
 *
 * Computer Science S-111
 * 
 * Demonstrates the use of methods from the Scanner class, as
 * well as reinforcing material on variables, expressions, 
 * and casting.
 */

import java.util.*;

public class GradeCalculator {
    public static void main(String[] args) {
        Scanner console = new Scanner(System.in);
        
        // Input the necessary info.
        System.out.print("Points earned: ");
        int points = console.nextInt();
        System.out.print("Possible points: ");
        int possiblePoints = console.nextInt();

        // Compute the grade as a percentage.
        // Note that we need to cast one of the operands to
        // get floating-point division instead of integer division.
        double grade = points/(double)possiblePoints;
        grade = grade * 100.0;

        // Output the result.
        System.out.println("grade is " + grade);
    }
}
