Pseudocode assignment

I want the answer for pattern problem of this assignment.

This is simply pattern: start with i and go a head i times and then decrease (i-1) times.
for (int i=0;i<n;i++)
{
for(j=0;j<i;j++)
print(j+i)
for(j=i-2;j>=0;jā€“)
print(j+i)
}

1 Like