Picture

#include <cstdio>

int main()
{
	int n, m;
	while(scanf("%d %d", &n, &m) != EOF)
	{
		printf("+");
		for(int j = 0; j < n; ++ j)
		{
			printf("-");
		}
		printf("+\n");
		
		for(int i = 0; i < m; ++ i)
		{
			printf("|");
			for(int j = 0; j < n; ++ j)
			{
				printf(" ");
			}
			printf("|\n");
		}
		
		printf("+");
		for(int j = 0; j < n; ++ j)
		{
			printf("-");
		}
		printf("+\n\n");
	}
	
	return 0;
}

  

posted @ 2019-08-03 17:33  青衫客36  阅读(210)  评论(0编辑  收藏  举报