class Error {
    public static void main(String args[]) {
        try {
            int denominator = 0;
            if (denominator != 0) {
                int a = 50 / denominator;
                System.out.println("Result: " + a);
            } else {
                System.out.println("Cannot divide by zero!");
            }
        } catch (ArithmeticException e) {
            System.out.println("Error: " + e.getMessage());
}   }     }
