杭电-------2052Picture(C语言)
#include<stdio.h> int main() { int width, height; int i, j; while (~scanf("%d %d", &width, &height)) { if (width != 0 && height != 0) { printf("+"); for (i = 0; i < width; i++) { printf("-"); } printf("+\n"); for (j = 0; j < height; j++) { printf("|"); for (i = 0; i < width; i++) { printf(" "); } printf("|\n"); } printf("+"); for (i = 0; i < width; i++) { printf("-"); } printf("+\n"); } printf("\n"); } return 0; }