12 solutions
-
1
#include<bits/stdc++.h> using namespace std; int main() { int m,n,q; char w; cin>>m>>n>>w>>q; if(q==1) { for(int i=1;i<=m;i++) { for(int j=1;j<=n;j++) { cout<<w; } cout<<endl; } } if(q==0) { for(int i=1;i<=m;i++) { for(int j=1;j<=n;j++) { if(i==1||i==m||j==1||j==n) { cout<<w; } else { cout<<" "; } } cout<<endl; } } return 0; }
Information
- ID
- 885
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 1
- Tags
- (None)
- # Submissions
- 244
- Accepted
- 93
- Uploaded By