/*
 * "Grundkurs Programmieren in Java - Band 1 (4. Auflage, 2007)"
 * 2001-2007, Carl Hanser Verlag
 * Quelltext zu Aufgabe 4.23 (Version 4.0)
 * (c) 2001-2007 D. Ratz, J. Scheffler, D. Seese, J. Wiesenberger
 *
 */

import Prog1Tools.IOTools;

public class Quersumme {

  public static void main(String [] args) {

    double a, b, c, d, e;

    a = IOTools.readDouble("a = ");
    b = IOTools.readDouble("b = ");
    c = IOTools.readDouble("c = ");
    d = IOTools.readDouble("d = ");

    if (b > a) 
      if (c > b)
        if (d > c)
          e = d;
        else
          e = c;
      else
        if (d > b) 
          e = d;
        else
          e = b;
    else
      if (c > a)
        if (d > c)
          e = d;
        else
          e = c;
      else
        if (d > a)
          e = d;
        else
          e = a;

    System.out.println("e = " + e);
  }
}
