#include<iostream>
using namespace std;
int main()
{
double n;
char ch;
cin >> n >> ch;
for (int i = 0; i < n; i++)
cout << ch;
cout << endl;
for (int i = 0; i < (int)(n / 2 + 0.5 - 2); i++)
{
for (int j = 0; j < n; j++)
{
if (j == 0 || j == n - 1)
cout << ch;
else
cout << " ";
}
cout << endl;
}
for (int i = 0; i < n; i++)
cout << ch;
system("pause");
return 0;
}
再次复习了一下四舍五入的方法