fork download
  1. <?php
  2.  
  3. // your code goes here
  4. function printPattern($n){
  5. for($i=1; $i<=$n+4; $i++){
  6. for($j=$i; $j<=$n; $j++){
  7. echo "*";
  8. }
  9. echo "</br>";
  10. }
  11.  
  12. }
  13.  
  14. $n =5;
  15. printPattern($n);
Success #stdin #stdout 0.03s 26068KB
stdin
5
stdout
                                *****</br>****</br>***</br>**</br>*</br></br></br></br></br>