画井字题解

handsomeyangyuyu 2024-01-05 11:18:37

#include using namespace std; int main(){ int n; cin>>n; for(int i=1;i<=3n+2;i++){ for(int j=1;j<=3n+2;j++){ if(j==n+1||j==2*(n+1)||i==n+1||i==2*(n+1)){ cout<<"#"; }else{ cout<<" "; } } cout<<endl; } }