SAT.java


Below is the syntax highlighted version of SAT.java from §2.2 Libraries.


/******************************************************************************
 *  Compilation:  javac SAT.java
 *  Execution:    java SAT z
 *
 *  java SAT 1200
 *  0.8067627906285625
 * 
 *  java SAT 1500
 *  0.9893164837383883
 *
 ******************************************************************************/

public class SAT {
    public static void main(String[] args) {
        double z = Double.parseDouble(args[0]);
        double v = Gaussian.cdf((z - 1019) / 209);
        StdOut.println(v);
    }
}


Copyright © 2000–2017, Robert Sedgewick and Kevin Wayne.
Last updated: Tue Feb 6 02:07:35 EST 2018.