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–2022, Robert Sedgewick and Kevin Wayne.
Last updated: Thu Aug 11 10:17:58 EDT 2022.