提交时间:2024-12-11 17:17:18

运行 ID: 58490

#include<iostream> using namespace std; int main(){ int a,h; char c; bool b; cin>>h>>a>>c>>b; for(int i=1;i<=h;i++){ for(int j=1;j<=a;j++){ if(b==0){ if(i==1||i==h||j==1||j==a) cout<<c; else cout<<" "; }else cout<<c; } cout<<endl; } return 0; }