题解
题解:
注意“行数是列数的50%(四舍五入)”
#include<iostream>
using namespace std;
int main()
{
int n;
char c;
cin >> n >> c;
int n1;
if (n % == )
n1 = n / - ;
else
n1 = n / - ;
for (int i = ; i < n; i++)
{
cout << c;
}
cout << endl;
for (int i = ; i < n1; i++)
{
cout << c;
for (int j = ; j < (n - ); j++)
{
cout << " ";
}
cout << c;
cout << endl;
}
for (int i = ; i < n; i++)
{
cout << c;
}
cout << endl;
return ;
}