杭电acm--2052
来源:互联网 发布:caffe loss大小 编辑:程序博客网 时间:2024/05/17 02:41
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.
after each case, you should a blank line.
#include<stdio.h>#include<stdlib.h>#include<math.h>//#include<string.h>//#define P 3.141592653void main(){int n, m;while (scanf("%d%d", &n, &m) != EOF){if (n < 0 || m >= 75)break;printf("+");for (int i = 0; i < n; i++)printf("-");printf("+\n");for (int j = 0; j < m; j++){printf("|");for (int i = 0; i < n; i++)printf(" ");printf("|\n");}printf("+");for (int i = 0; i < n; i++)printf("-");printf("+\n");printf("\n");}system("pause");}
0 0
- 杭电acm--2052
- 杭电ACM 2052 Picture
- 杭电ACM 2052 Picture
- 杭电ACM—HDU-2052Picture
- 杭电ACM 1003
- 杭电 ACM 2016
- 杭电acm 1010
- 杭电 acm 1045
- 杭电ACM-1010
- 杭电ACM 1172
- 杭电ACM 1174
- 杭电ACM 1175
- 杭电ACM 分类
- 杭电ACM分类
- 杭电acm 1000
- 杭电acm 1001
- 杭电acm 1002
- 杭电acm分类
- C++中的SFINAE
- C++实现屏幕截图(全屏截图)
- 设计模式之观察者模式---Observer Pattern
- Codevs 1065 01字符串
- 带碰撞检测的摄像机
- 杭电acm--2052
- [leetcode-284]Peeking Iterator(java)
- 3D GAME PROGRAMMING WITH DIRECTX11(4)
- Lombok -- 简化你的Java编码 (JDK6+)
- 【UI初级------连载七】标签控制器
- HDU 1698 Just a Hook
- 关于Java中的封装、多态、继承(1)
- [BZOJ1046] [HAOI2007]上升序列
- 【项目】——B/S开发中的Static陷阱