Picture hd 2052
Picture
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 8193 Accepted Submission(s): 4287
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
+---+
| |
| |
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 8193 Accepted Submission(s): 4287
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<stdio.h>
int main()
{
int a,b,i,j;
while(scanf("%d%d",&a,&b)!=EOF)
{
printf("+");
for(i=0;i<a;i++)
printf("-");
printf("+");
printf("\n");
for(i=0;i<b;i++)
{
printf("|");
for(j=0;j<a;j++)
printf(" ");
printf("|");
printf("\n");
}
printf("+");
for(i=0;i<a;i++)
printf("-");
printf("+");
printf("\n");
printf("\n");
}
return 0;
}
相關文章
- picture
- picture degrade
- HDU 2052(C語言+註釋)+HDU 2090C語言
- watchOS 學習筆記 | Big Picture筆記
- WPF image show web picture via url and converterWeb
- 美國人口統計展望報告:2022至2052年
- 密碼 hd 2043密碼
- Big Number hd 1212
- the Sum of Cube hd 5053
- 不要62 hd 2089
- 統計母音 hd 2027
- 字串統計 hd 2017字串
- 偶數求和 hd 2015
- 剪花布條hd 2087
- 1sting hd 1865
- A + B Problem II hd 1002
- 母牛的故事 hd 2018
- 18歲生日 hd 1201
- 美素數 hd 4548
- 素數判定 hd 2012
- 又見GCD hd 2504GC
- Mac有趣圖片編輯軟體——Pimp My Picture for MacMac
- HD Tune軟體怎麼用?使用HD tune檢測硬碟的方法教程硬碟
- Lowest Common Multiple Plus hd 2028
- 海選女主角 hd 2022
- 多項式求和 hd 2011
- 求平均成績 hd 2023
- 折線分割平面 hd 2050
- 無限的路 hd 2073
- 整除的尾數 hd 2099
- 大菲波數 hd 1715
- 超級樓梯 hd 2041
- 最小公倍數 hd 1108
- 攻防世界 Misc高手進階區 5分題 picture2
- Latex編譯錯誤:Unable to load picture or PDF file 問題解決編譯
- 查詢最大元素 hd 2025
- 一隻小蜜蜂 hd 2044
- 分拆素數和 hd 2098