Problem Description
Give you the width and height of the rectangle,darw it.
 
Input
Input contains a number of test cases.For each case ,there are two numbers n and m (0 < n,m < 75)indicate the width and height of the rectangle.Iuput ends of EOF.
 
Output
For each case,you should draw a rectangle with the width and height giving in the input. after each case, you should a blank line.
 
Sample Input
3 2
 
Sample Output
+---+ | | | | +---+
 #include <cstdio>
int main()
{
int n,m;
while(~scanf("%d%d",&n,&m))
{
printf("+");
for(int i=;i<n;i++)
{
printf("-");
}
printf("+\n");
for(int i=;i<m;i++)
{
printf("|");
for(int j=;j<n;j++)
{
printf(" ");
}
printf("|\n");
}
printf("+");
for(int i=;i<n;i++)
{
printf("-");
}
printf("+");
printf("\n\n");
}
return ;
}

HDU_2052——画矩形的更多相关文章

  1. c# winform 动态画矩形 矩形大小可以拖动

    http://jhlong12345.blog.163.com/blog/static/1230631292015544450189/#  结合上一篇,继续 矩形大小的调整   还有小bug,思路有了 ...

  2. AC日记——画矩形 1.5 42

    42:画矩形 总时间限制:  1000ms 内存限制:  65536kB 描述 根据参数,画出矩形. 输入 输入一行,包括四个参数:前两个参数为整数,依次代表矩形的高和宽(高不少于3行不多于10行,宽 ...

  3. 【液晶模块系列基础视频】4.2.X-GUI图形界面库-画矩形函数简介

    [液晶模块系列基础视频]4.2.X-GUI图形界面库-画矩形函数简介 ============================== 技术论坛:http://www.eeschool.org 博客地址: ...

  4. 用gd库画矩形和椭圆

    画矩形:bool imagerectangle ( resource $image画布资源 , int $x1左上角的坐标 , int $y1 , int $x2 右下角坐标, int $y2 , i ...

  5. 1.1.2-学习Opencv与MFC混合编程之---画图工具 画直线 画圆 画矩形

    源代码地址:http://download.csdn.net/detail/nuptboyzhb/3961685 画图工具 1.     画直线 Ø  增加‘直线’菜单项,建立类向导: Ø  对CXX ...

  6. python+opencv选出视频中一帧再利用鼠标回调实现图像上画矩形框

    最近因为要实现模板匹配,需要在视频中选中一个目标,然后框出(即作为模板),对其利用模板匹配的方法进行检测.于是需要首先选出视频中的一帧,但是在利用摄像头读视频的过程中我唯一能想到的方法就是: 1.在视 ...

  7. PHP画矩形,椭圆,圆,画椭圆弧 ,饼状图

    1:画矩形: imagerectangle ( resource $image , int $x1 , int $y1 , int $x2 , int $y2 , int $col ) imagere ...

  8. python在图片上画矩形

    python在图片上画矩形 image_path = '' image = cv2.imread(image_path) first_point = (100, 100) last_point = ( ...

  9. delphi image控件上画矩形的问题

    画的时候发现鼠标点的位置和矩形的位置有偏移 后来查看发现是由于image控件时stretch属性设置为true,这样在画的时候是缩放了的 也就是画到image显示的图片上去了 所以如果要画矩形,要按照 ...

随机推荐

  1. SQLite3基本使用从shell到python

    SQLite是一个轻量级的关系型数据库,在訪问量不超过10万PV的中小站点中使用绰绰有余. 并且使用方便,接口简单,以下从命令行和python接口双方面介绍SQLite3的基本操作. 在linux终端 ...

  2. Android ProgressDialog 加载进度

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools= ...

  3. 机器学习笔记——K-means

    K-means是一种聚类算法,其要求用户设定聚类个数k作为输入參数,因此,在执行此算法前,须要预计须要的簇的个数. 如果有n个点,须要聚到k个簇中.K-means算法首先从包括k个中心点的初始集合開始 ...

  4. vc++上的MFC的对象序列化和反序列化

      注意点: 1. 必须类型序列化声明    DECLARE_SERIAL( Person )  2. 必须写出实现宏 IMPLEMENT_SERIAL(Person, CObject, VERSIO ...

  5. Win7系统安装MySQL5.5.21图解教程

    转自:http://www.jb51.net/article/37310.htm 这篇文章主要介绍了如何在win7中安装mysql,所以加上了MySQL的下载过程,希望对需要的人有所帮助 大家都知道M ...

  6. 一些Android程序的反逆向方法

    1.检测调试器 在代码中检测调试器的动态调试 首先在AndroidMainfest.xml文件中设置android:debuggable="false",让程序不可调试.这样别人想 ...

  7. Mysql group_concat

    select p.id,p.parent_id,group_concat(distinct(CONCAT("分类名称:",c.name)) order by c.id desc s ...

  8. The Primo ScholarRank Technology: Bringing the Most Relevant Results to the Top of the List

    By Tamar Sadeh, Director of Marketing In today’s world, users’ expectations for a quick and easy sea ...

  9. Vim模式

    Vim是从vi发展出来的一个文本编辑器.代码补完.编译及错误跳转等方便编程的功能特别丰富,在程序员中被广泛使用.和Emacs并列成为类Unix系统用户最喜欢的编辑器.    Vim的第一个版本由布莱姆 ...

  10. 测试RegExp对象的属性

    //测试RegExp对象的属性function testRegExpProperty(){ var regexp = /abc/; //regexp.ignoreCase = true; //无效 c ...