胡盛哲 • 10个月前
#include<bits/stdc++.h>
using namespace std;
int main()
{
int q,w,r;
char e;
cin>>q>>w>>e>>r;
if(r==0){
for(int i=0;i<w;i++) cout<<e;
for(int i=0;i<q-2;i++){
cout<<endl<<e;
for(int j=0;j<w-2;j++) cout<<' ';
cout<<e;
}
cout<<endl;
for(int i=0;i<w;i++) cout<<e;
}
else{
for(int i=0;i<q;i++){
for(int j=0;j<w;j++) cout<<e;
cout<<endl;
}
}
}
评论: