Daily print a multiplication table algorithm ----

Print multiplication table

Two cycles

    for($i = 9; $i > 0 ; $i--){
        for ($j = 9; $j >= $i; $j--){
            $sult = strlen($i * $j) >1 ? " = " .$i * $j ."   ": " =  " .$i * $j ."    " ;
            echo $i ,' * ' , $j  ,$sult;

        }
        echo "<br>";
    }

Guess you like

Origin www.cnblogs.com/zhy7blog/p/11228898.html