打印小飞机
#include<iostream>
using namespace std;
int main()
{
int T,n,i,j,y;
cin>>T;
for(i=0;i<T;i++)
{
cin>>n;
for(j=0;j<(2*n-1);j++)
{
cout<<" ";
}cout<<"*\n";
for(j=(2*n-2);j>=n;j--)
{
for(y=0;y<j;y++)
{cout<<" ";}
cout<<"*";
for(y=0;y<(4*n-3-2*j);y++)
{cout<<" ";}
cout<<"*\n";
}
for(j=0;j<(n+1);j++)
{
cout<<"*";
}
for(j=0;j<(2*n-3);j++)
{
cout<<" ";
}
for(j=0;j<(n+1);j++)
{
cout<<"*";
}
cout<<'\n';
for(j=0;j<(n-2);j++)
{
cout<<"*";
for(y=0;y<(4*n-3);y++)
{
cout<<" ";
}
cout<<"*\n";
}
for(j=0;j<(n+1);j++)
{
cout<<"*";
}
for(j=0;j<(2*n-3);j++)
{
cout<<" ";
}
for(j=0;j<(n+1);j++)
{
cout<<"*";
}
cout<<'\n';
for(j=0;j<(n-1);j++)
{
for(y=0;y<n;y++)
{
cout<<" ";
}
cout<<"*";
for(y=0;y<(2*n-3);y++)
{
cout<<" ";
}
cout<<"*\n";
}
for(j=0;j<n;j++)
{
cout<<" ";
}
for(j=0;j<(2*n-1);j++)
{
cout<<"*";
}
cout<<'\n'<<'\n';
}
}