Created
September 23, 2022 12:08
-
-
Save kangarie/0f3674413d20401a6240230c6ebe7646 to your computer and use it in GitHub Desktop.
PHP script to draw a triangle of wildcard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$n = 5; | |
for($i=1;$i<=$n;$i++) { | |
for($j=1;$j<=$i;$j++) echo "*"; | |
echo "\n"; | |
} | |
/* | |
output | |
* | |
** | |
*** | |
**** | |
***** | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment