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. xshell设置界面的编码方式

    文件->属性->终端->编码->UTF-8

  2. [leetcode-537-Complex Number Multiplication]

    Given two strings representing two complex numbers. You need to return a string representing their m ...

  3. 【LeetCode】105 & 106. Construct Binary Tree from Inorder and Postorder Traversal

    题目: Given inorder and postorder traversal of a tree, construct the binary tree. Note:You may assume ...

  4. Python对数据库的增删改查

    #!/usr/bin/env python   import MySQLdb   DATABASE_NAME = 'hero'   class HeroDB:     # init class and ...

  5. H5学习第一周

    已经接触H5一个周了,经过学习,总算对H5有了一些了解和认知,下面就总结一下我对H5的认知和感悟. 首先接触的是H5的常用标签[meta],它有其以下常用属性 1.charset属性.单独使用,设置文 ...

  6. winform利用委托delegate进行窗体间通信

    前段时间学习委托,感觉很模糊的样子,也做过许多实例,但是项目中一直没有用到,今天在项目中遇到一个很简单的例子,现在拿出来,做一个简单的记录. 要求:将弹出框里勾选的内容返回到主面板上. 工具:委托. ...

  7. 在Linux环境如何在不解压情况下搜索多个zip包中匹配的字符串内容

    今天有个生产文件需要查日志,但因为是比较久远的故障,日志已经被归档为zip包放到某个目录下了,在不知道具体日期时间的情况下,总不能一个一个解压搜索吧.于是就研究一下怎么在多个压缩包里搜索字符串了.目前 ...

  8. 使用 electron 做个播放器

    使用 electron 做个播放器 本文同步更新在:https://github.com/whxaxes/blog/issues/8 前言 虽然 electron 已经出来好长时间了,但是最近才玩了一 ...

  9. [jbdj]SpringMVC框架(3)映射器

    映射器:什么样的请求交给Action. 1} class  :  BeanNameUrlHandlerMapping  要掌握, 将程序员定义的Action所对应的<bean>标签的nam ...

  10. MySQL实现自动使用uuid作为主键以及解决不能调用触发器的一点思路

    这里使用触发程序实现此功能. 触发程序语法如下: Create trigger <tri_name> {before|after} {insert|update|delete} On &l ...