for($a=5; $a>=1; $a--)
{
for($b=1; $b<=$a; $b=$b+1)
{
echo $b." ";
}
echo "<br>";
}
for($a=1; $a<=5; $a=$a+1)
{
for($b=1; $b<=$a; $b=$b+1)
{
echo $a." ";
}
echo "<br>";
}
for($a=5; $a>=1; $a--)
{
for($b=1; $b<=$a; $b=$b+1)
{ print $b." ";
}
print "<br>";
for($a=1; $a<=5; $a=$a+1)
{
for($b=1; $b<=$a; $b=$b+1)
{
echo $a." ";
}
echo "<br>";
}
No comments:
Post a Comment