求助B2083
  • 板块灌水区
  • 楼主Like_Amao
  • 当前回复18
  • 已保存回复18
  • 发布时间2023/7/14 15:56
  • 上次更新2023/11/3 09:53:15
查看原帖
求助B2083
993044
Like_Amao楼主2023/7/14 15:56

#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; char d; cin>>a>>b>>d>>c; if(c==0) { for(int i=1;i<=b;i++) { cout<<d; } cout<<endl; for(int i=2;i<a;i++) { for(int j=1;j<=b;j++) { if(j==1 or j==b) { cout<<d; } else { cout<<" "; } } cout<<endl; } for(int i=1;i<=b;i++) { cout<<d; } } if(c==1) { for(int i=1;i<=a;i++) { for(int j=1;j<=b;j++) { cout<<d; } cout<<endl; } } }

2023/7/14 15:56
加载中...