Beispiel #1
0
  public void run() {
    println("Enter values to compute Pythagorean theorem.");

    int a = readInt("a: ");
    int b = readInt("b: ");

    double c = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));
    println("c = " + c);
  }