先画上面的四边形然后再画前面的矩形在画旁边的四边形
#include <iostream>
using namespace std;
char map[200][200];
int main()
{
int n;
cin>>n;
while(n--)
{
for(int i=0;i<200;i++)
for(int j=0;j<200;j++)
map[i][j]='.';
int a,b,c;
cin>>a>>b>>c;
int i;
for(i=1;i<=(b*2+1);i++)
{
for(int j=(b*2+1-i+1);j<=(b*2+1-i+a+a+1);j++)
{
if(i%2==0)
{
if(j%2==0)
{
map[i][j]='/';
}
}
else
{
if(j%2!=0)
{
map[i][j]='+';
}
else
{
map[i][j]='-';
}
}
}
}
int cont=i;
for(;i<=(c*2+cont);i++)
{
for(int j=1;j<=(a*2+1);j++)
{
if(i%2==0)
{
if(j%2!=0)
{
map[i][j]='|';
}
}
else
{
if(j%2!=0)
{
map[i][j]='+';
}
else
{
map[i][j]='-';
}
}
}
}
for(int j=1;j<=(b*2);j++)
{
for(int z=1;z<=(c*2+1);z++)
{
if(j%2==0)
{
if(z%2!=0)
{
map[z+j-1][b*2+1-j+a*2+1]='/';
}
else
map[z+j-1][b*2+1-j+a*2+1]='.';
}
else
{
if(z%2!=0)
{
map[z+j-1][b*2+1-j+a*2+1]='+';
}
else
map[z+j-1][b*2+1-j+a*2+1]='|';
}
}
}
for(int i=1;i<=(b*2+c*2+1);i++)
{
for(int j=1;j<=(a*2+1+b*2);j++)
cout<<map[i][j];
cout<<endl;
}
}
return 0;
}