import Prog1Tools.IOTools;
public class AssertionTest {

  public static double kehrwert (double x) {
    assert x != 0 : "/ by 0";
    return 1/x;
  }

  public static void main (String[] summand) {
    double x = IOTools.readDouble("x = ");
    try {
      System.out.println(kehrwert(x));
    }
    catch (AssertionError e) {
      System.out.println (e.getMessage());
    }
  }
}
