我是靠谱客的博主 傻傻高山,这篇文章主要介绍hdoj:2052,现在分享给大家,希望可以做个参考。

#include <iostream>
#include <string>
using namespace std;
int main()
{
int n, m;
while (cin >> m >> n)
{
for (int i = 0; i <= n+1; i++)
{
if (i == 0 || i == n+1)
{
cout << "+";
for (int j = 1; j <= m; j++)
cout << "-";
cout << "+";
cout << endl;
}
else
{
cout << "|";
for (int j = 1; j <= m; j++)
cout << " ";
cout << "|";
cout << endl;
}
}
cout << endl;
}
}

 

转载于:https://www.cnblogs.com/theskulls/p/6030965.html

最后

以上就是傻傻高山最近收集整理的关于hdoj:2052的全部内容,更多相关hdoj内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(61)

评论列表共有 0 条评论

立即
投稿
返回
顶部