Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $num = 5;
- $c = 1;
- for($row=1;$row<=$num;$row++){
- for($s=$num - $row;$s >=1 ;$s--){
- echo "*";
- }
- for($i=1;$i<=$row*2-1;$i++){
- echo $c % 2;
- $c++;
- }
- echo "<br>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement