Question { Mu Sigma, 61118 }
Write a program in c to print
1
121
12321
1234321
123454321
Answer
#include
using namespace std;
int main()
{
int i,j,k,t,n,c,a[20];
cin>>t;
for(k=0;k<20;k++)
a[k]=(k+1);
while(t--)
{
cin>>n;
for(i=0;i
{
c=i-1;
for(j=0;j<(2*i+1);j++)
{
if(i>=j)
cout<
else
{
cout<
c--;
}
}cout<<" ";
}cout<
}
return 0;
}