您的位置:首页 > 编程语言 > C语言/C++

L1-015. 跟奥巴马一起画方块(C++)

2016-05-22 10:23 477 查看
原题链接:https://www.patest.cn/contests/gplt/L1-015



我的代码:

#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
int N=0;
char C;
cin>>N>>C;
for(int i=0;i<( (N+1)/2 );i++)
{
for(int j=0;j<N;j++)
{
cout<<C;
}
cout<<endl;
}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: