提交时间:2025-12-27 11:18:33
运行 ID: 78714
#include<bits/stdc++.h> using namespace std; int main() { int a,b; bool wh; char ch; cin>>a>>b>>ch>>wh; if(wh) { for(int i=1;i<=a;i++) { for(int j=1;i<=b;j++) { cout<<ch; } cout<<endl; } } else { for(int i=1;i<=b;i++) { cout<<ch; } cout<<endl; for(int i=1;i<=a-2;i++) { cout<<ch; for(int j=1;i<=b-2;j++) { cout<<" "; } cout<<ch; cout<<endl; } for(int i=1;i<=b;i++) { cout<<ch; } } return 0; }