You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
488 B
26 lines
488 B
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
int h, w, fill;
|
|
char c;
|
|
|
|
cin >> h >> w >> c >> fill;
|
|
|
|
for (int i = 0; i < h; i++) {
|
|
for (int j = 0; j < w; j++) {
|
|
if (j == 0 || j == w - 1 || i == 0 || i == h - 1)
|
|
cout << c;
|
|
else if (fill) {
|
|
cout << c;
|
|
} else {
|
|
cout << ' ';
|
|
}
|
|
}
|
|
cout << endl;
|
|
}
|
|
|
|
return 0;
|
|
}
|