Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.22 KB | None | 0 0
  1. <?php
  2. $num = 5;
  3. $c = 1;
  4. for($row=1;$row<=$num;$row++){
  5.     for($s=$num - $row;$s >=1 ;$s--){
  6.         echo "*";
  7.     }
  8.     for($i=1;$i<=$row*2-1;$i++){
  9.         echo $c % 2;
  10.         $c++;
  11.     }
  12.     echo "<br>";
  13. }
  14.  
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement