#include
#include
using std::cout; using std::cin; using std::endl; using std::string;
int main()
{
cout << “please enter your name” << endl;
string name;
cin >> name;
const string greeting = “hello,” + name + “!”;
const int pad = 5;
const int heng = pad * 2 + 3;
const string::size_type shu = greeting.size() + pad * 2 + 2;
for (int h = 0; h != heng; h++)
{
string::size_type s = 0;
while (s != shu)
{
if (h ==pad + 1 && s ==pad + 1)
{
cout << greeting;
s += greeting.size();
}
else
{
if (s == 0 || s == shu - 1 || h == 0 || h == heng - 1)
{
cout << “*”;
}
else
{
cout << " ";
}
++s;
}
}cout << endl;
}
return 0;
}