I need algorithm to print for example
1
22
333
4444
4444
333
22
1
where is specified 1 as min and 4 as max.
this is what i got so far but i prints only one member in each line.
global proc what(int $min,int$max)
{
for ($i=$min;$i<$max + 1;$i++)
print ($i + "\n");
for ($i=$max;$i>$min - 2 + 1;$i--)
print ($i + "\n");
}