c++++++++题解
2025-06-29 10:51:16
发布于:浙江
17阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n,m;
cin>>n>>m;
for(int i=1;i<=2*n+1;i++){
for(int j=1;j<=2*m+1;j++){
if(i%2==1 && j%2==1){
cout<<"+";
}
if(i%2==1 && j%2==0){
cout<<"-";
}
if(i%2==0 && j%2==1){
cout<<"|";
}
if(i%2==0 && j%2==0){
cout<<" ";
}
}
cout<<endl;
}
return 0;
}
这是对的
真是对的
其他的都是错的,这是老师讲的
这里空空如也
有帮助,赞一个