题目链接:跟奥巴马一起画方块
C++代码实现
#include<iostream>
#include<vector>
#include<cmath>
using namespace std;
int main()
{
int n;
char ch;
cin>>n>>ch;
for(int i=0;i<round((double)n/(double)2);i++)
{
for(int j=0;j<n;j++)
{
cout<<ch;
}
cout<<endl;
}
return 0;
}
318

被折叠的 条评论
为什么被折叠?



