标签:ref acm ane similar show The out NPU key
#include<stdio.h> int main() { int x,y; while(scanf("%d%d",&x,&y)!=EOF) { x+=2; y+=2; for(int i=0;i<y;i++) { for(int j=0;j<x;j++) { if((i==0&&j==0) ||(i==0&&j==x-1)||(i==y-1&&j==0)||(i==y-1&&j==x-1)) printf("+"); else if(i==0||i==y-1) printf("-"); else if(j==0||j==x-1) printf("|"); else printf(" "); } printf("\n"); } printf("\n"); } }
标签:ref acm ane similar show The out NPU key
原文地址:https://www.cnblogs.com/wzmm/p/12683032.html