Pyramid in PHP Part I
PHP Pyramid Part I
<?php
$limit = 5;
for($i=0;$i<=$limit;$i++)
{
for($k=$i;$k>0;$k--)
{
echo $k;
}
echo "<br/>";
}
?>
Output: 1 21 321 4321 54321
<?php
$limit = 5;
for($i=0;$i<=$limit;$i++)
{
for($k=$i;$k>0;$k--)
{
echo $k;
}
echo "<br/>";
}
?>
Output: 1 21 321 4321 54321
by Qualitians · Published October 1, 2016 · Last modified July 23, 2024
by Qualitians · Published October 1, 2016 · Last modified July 23, 2024
by Qualitians · Published October 1, 2016 · Last modified July 23, 2024