public class PembagianDenganNol {
    public static void main(String[] args) {
        int pembilang = 7;
        int penyebut = 0;

        try {
            System.out.println(pembilang / penyebut);
        } catch (ArithmeticException e) {
            System.out.println("Gagal: ArithmeticException - " + e.getMessage());
        }

        System.out.println("7.0 / 0 = " + (7.0 / 0));
        System.out.println("0.0 / 0 = " + (0.0 / 0));
    }
}
