中级天翼
#include<bits/stdc++.h>
#include<windows.h>
#include<con>
using namespace std;
int main(){
int n,cnt=0,cnt1=1,cnt2=0,cnt3=1,cnt5;
bool cnt4=0;
cin>>n;
if(n==1){
cout<<"..+---+"<<endl;
cout<<"./ /|"<<endl;
cout<<"+---+ |"<<endl;
cout<<"| | +"<<endl;
cout<<"| |/."<<endl;
cout<<"+---+..";
return 0;
}
cnt5=n*2-1;
for(int i=1;i<=(n*2);i++){
for(int j=1;j<=n*2-cnt;j++){
cout<<'.';
}
if(cnt1%2==1){
cout<<'+';
for(int j=1;j<=3;j++){
cout<<'-';
}
cout<<'+';
}else{
cout<<'/';
for(int j=1;j<=3;j++){
cout<<' ';
}
cout<<'/';
}
if(i>=2){
cnt2=(cnt2)%(2);
for(int j=1;j<=cnt2;j++){
cout<<' ';
}
cout<<'|';
cnt2++;
}
if(i>=4){
cnt3=(cnt3)%(2);
for(int j=1;j<=cnt3;j++){
cout<<' ';
}
if(cnt4==0){
cout<<'+';
}else{
cout<<'/';
}
cnt3++;
cnt4=!cnt4;
}
if(i>=5){
for(int j=1;j<=n*2-cnt5;j++){
cout<<'.';
}
cnt5--;
}
cnt++;
cnt1++;
cout<<endl;
}
cout<<"+---+ |/";
for(int i=1;i<=n*2-3;i++){
cout<<'.';
}
cout<<endl;
cout<<"| | +";
for(int i=1;i<=n*2-2;i++){
cout<<'.';
}
cout<<endl;
cout<<"| |/";
for(int i=1;i<=n*2-1;i++){
cout<<'.';
}
cout<<endl;
cout<<"+---+";
for(int i=1;i<=n*2;i++){
cout<<'.';
}
return 0;
}
修练者
别试!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!