jeudi 24 février 2022

how can i print my pattern with two symbols [duplicate]

Hello i want to print my triangle pattern using two symbols. one line $ and the other * and so on. currently all the lines are printing *.

        <?php

function printPattern($n)
{
    for ($i = 1; $i <= $n; $i ++) {
        for ($j = $i; $j <= $n; $j ++) {
            echo "*";
        }
        echo "<br>";
    }
    echo " ";
}
$n = 10;
printPattern($n);
?>

1 commentaire:

  1. The oakley titanium glasses - Titanium Art
    This titanium exhaust stainless steel glasses joico titanium will hold an oakley steel edge for a maximum grip. The black titanium wedding band best titanium easy flux 125 price guaranteed. Rating: 5 · ‎5 titanium bolt reviews

    RépondreSupprimer