Location: PHPKode > scripts > Simple Math > simple-math/example.php
<PRE>
Test for lsSimpleMath.
<?
    require_once("lsSimpleMath.class.php");

    $lsSimpleMath = new lsSimpleMath();
    print("5! should equal 120\n");
    printf("\t5! = %u\n", $lsSimpleMath->Factorial(5));
    print("P 10,3 should equal 720\n");
    printf("\tP 10,3 = %u\n", $lsSimpleMath->Permutation(10,3));
    print("C 52,5 should equal 2598960\n");
    printf("\t C 52,5 = %u\n", $lsSimpleMath->Combination(52,5));
?>
</PRE>
Return current item: Simple Math