提交时间:2024-10-24 22:30:05
运行 ID: 53660
#include <stdio.h> int main() { int height, width; char symbol; int isFilled; scanf("%d %d %c %d", &height, &width, &symbol, &isFilled); for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { if (isFilled || (i == 0 && j == 0) || (i == height - 1 && j == width - 1)) { printf("%c", symbol); } else { printf(" "); } } printf("\n"); } return 0; }