题解
2026-05-22 15:42:07
发布于:上海
7阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int n,m;
int main(){
cin >> n >> m;
for(int i = 1;i <= n * 2 + 1;i++){
for(int j = 1;j <= m * 2 + 1;j++){
if(i % 2){
if(j % 2)cout << "+";
else cout << "-";
}else{
if(j % 2)cout << "|";
else cout<<" ";
}
}cout<<endl;
}
return 0;
}
这里空空如也





有帮助,赞一个