```
#include<iostream>
using namespace std;
#define endl "\n"
int main(){
int a,b,d;
char c;
cin>>a>>b>>c>>d;
char all[100][100] = {};
for (int i = 0;i < a;i++){
for (int j = 0;j < b;j++){
all[i][j] = c;
}
}
for (int k = 1;k < a-1;k++){
for (int s = 1;s < b-1;s++){
if (d == 0) all[k][s] = ' ';
else all[k][s] = c;
}
}
for (int i = 0;i < a;i++){
for(int j = 0;j < b;j++){
cout<<all[i][j];
}
cout<<endl;
}
return 0;
}
```
by algorithm_cmath @ 2022-05-26 13:10:15
这个是正确的,原理是声明数组,在数组内写符号(第二个循环是用来覆盖的),最后输出
by algorithm_cmath @ 2022-05-26 13:11:58
欧克欧克
by billifs @ 2022-05-27 19:47:13
all[i][j] 是神马东东
by billifs @ 2022-05-27 19:50:40