void main() {
    String answer = IO.readln("How many tickets? ");

    try {
        int tickets = Integer.parseInt(answer.strip());
        IO.println("That will be $" + (tickets * 12) + ".");
    } catch (NumberFormatException e) {
        IO.println("Please enter a whole number.");
    }
}

// From Groundwork, chapter 4 (ch04-making-decisions), box 11.
// This example is from Groundwork, licensed CC BY-NC-SA 4.0.
// Run with: java ch04_11.java
