Description

给你一个矩形的宽度和高度,要求按sample output样例输出此矩形。

Input

输入包含多组数据,每一组包含两个数N和M( 0 < N ,M , < 75 )分别代表矩形的宽和高。输入以EOF结束。

Output

对每一组N和M,输出相应的矩形。每一组输出结束后输出一个空行。

Sample Input

3 2

Sample Output

+---+
| |
| |
+---+

Source

Hdu 翻译

#include <stdio.h>

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

akoj-1059-Picture的更多相关文章

  1. 基于Picture Library创建的图片文档库中的上传多个文件功能(upload multiple files)报错怎么解决?

    复现过程 首先,我创建了一个基于Picture Library的图片文档库,名字是 Pic Lib 创建完毕后,我点击它的Upload 下拉菜单,点击Upload Picture按钮 在弹出的对话框中 ...

  2. MFC Picture控件加载图片

    CStatic *pPic = (CStatic*)GetDlgItem(IDC_PICTURE); CBitmap bitmap; bitmap.LoadBitmapW(IDB_BITMAP2); ...

  3. [POJ1177]Picture

    [POJ1177]Picture 试题描述 A number of rectangular posters, photographs and other pictures of the same sh ...

  4. ytu 1059: 判别该年份是否闰年(水题,宏定义)

    1059: 判别该年份是否闰年 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 222  Solved: 139[Submit][Status][Web ...

  5. USACO 5.5 Picture(周长并)

    POJ最近做过的原题. /* ID: cuizhe LANG: C++ TASK: picture */ #include <cstdio> #include <cstring> ...

  6. 彩色照片转换为黑白照片(Color image converted to black and white picture)

    This blog will be talking about the color image converted to black and white picture. The project st ...

  7. HDU 1828 Picture(线段树扫描线求周长)

    Picture Time Limit: 6000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Su ...

  8. don't forget the bigger picture

    Imagine a circle that contains all of human knowledge: By the time you finish elementary school, you ...

  9. A Complete Guide to the <Picture> Element

    If you’ve ever struggled building responsive websites, this post is for you. It’s part of a series o ...

  10. 【BZOJ】1059: [ZJOI2007]矩阵游戏(二分图匹配)

    http://www.lydsy.com/JudgeOnline/problem.php?id=1059 本题可以看出,无论怎样变化,在同一行和同一列的数永远都不会分手---还是吐槽,,我第一眼yy了 ...

随机推荐

  1. 使用spring mvc返回JSON,chrome可以,firefox不行的问题定位

    转载http://ks.netease.com/blog?id=4024 作者:李景     场景:          前端Post请求同一个url地址,在chrome浏览器上有正常返回json,而在 ...

  2. 一个"2-SUM"问题

    题目要求: Download the text file here. (Right click and save link as). The goal of this problem is to im ...

  3. 【Android Developers Training】 29. 从Activity获得结果

    注:本文翻译自Google官方的Android Developers Training文档,译者技术一般,由于喜爱安卓而产生了翻译的念头,纯属个人兴趣爱好. 原文链接:http://developer ...

  4. JavaScript开发者必备的10个sublime的插件

    http://www.codeceo.com/article/10-js-sublime-text-plugins.html

  5. grep[行号&正则匹配字符有颜色]

    事情是这样的,昨天在深入学习grep命令时,看到别人博客用grep正则匹配,不仅行数有颜色,而且匹配到的字符也有颜色.我在CRT也试了下,毛颜色都没有.顿时感觉 so low. 解决 编辑vim~/. ...

  6. npm 的用法

    当用npm 安装依赖时如果加上  --save  就会自动把依赖模块添加到package.json中  别人下载时直接npm install 加载后就可以了

  7. React Native之APK文件签名及打包

    生成apk签名文件 我们使用android studio的方式进行签名 AS工具栏找到并点击 build->gennrate signed apk 两种情况: 1.这里如果已经有签名文件了则直接 ...

  8. 设备常用框架framework

    framework名称 framework说明 framework文档 Accelerate.framework 包含加速数学和DSP函数 http://developer.apple.com/iph ...

  9. Merge使用

    Role r = new Role(); r.setName("TEST"); r.setDescription("123"); r.setLevel(2); ...

  10. Win8.1下VM与Hyper-v冲突解决方法

    不需要使用hyperv.去程序那里关闭hyperv.要同时使用两中虚拟机.使用折中的办法:  创建两个启动菜单,在启动的时候选择是否要运行 Hyper-V. 管理员身份运行命令提示符 cmd 输入 b ...