on up back w3c Fifth International World Wide Web Conference

Mortgage Applet (6)

            StringBuffer msg = new StringBuffer();
            msg.append("\nprincipal=" + bal + "  interest=" + intyr
                     + "  years=" + nyears + "\n");
            double intmo = intyr / 12.;
            int npmts = nyears * 12;
            double pmt = bal * (intmo / (1.- Math.pow(1.+ intmo,-npmts)));
            msg.append("payment\ttotal\tinterest\tprincipal\tbalance\n");
            msg.append("number\tpayment\tpayment\tpayment\n");
            msg.append("\t\t\t\t" + bal + "\n");


Java - An Introductory Language Tutorial (E.A.Johnson)