#include using namespace std;

int main() { int height, width; char symbol; bool solid;

cin >> height >> width >> symbol;

if (symbol == '1') {
    solid = true;
} else {
    solid = false;
}

for (int i = 1; i <= height; i++) {
    for (int j = 1; j <= width; j++) {
        if (i == 1 || i == height || j == 1 || j == width) {
            cout << symbol;
        } else if (solid) {
            cout << symbol;
        } else {
            cout << " ";
        }
    }
    cout << endl;
}

return 0;

}

题目描述根据参数画出一个空心或实心的矩形。输入输入一行包括四个参数:前两个参数为整数依次代表矩形的高和宽高不少于 行不多于 行宽不少于 列不多于 列;第三个参数是一个字符表示用来画图的矩形符号;第四个参数为 或 代表空心 代表实心。输出输出画出的图形。样例输入 复制7 7 0样例输出 复制