64,654
社区成员
发帖
与我相关
我的任务
分享
for (int i =0; i != wide; ++i)
if (i == 0 || i == wide / 2 - 1 || i == wide - 1)
{
for ( int j = 0; j != wide; ++j)
cout << setw(2) << left << '*';
cout << endl;
}
else
cout << setw(wide - 1) << '*' << setw(wide - 1) << '*' << '*' << endl;
streamsize __CLR_OR_THIS_CALL width(streamsize _Newwidth)
{ // set width to argument
streamsize _Oldwidth = _Wide;
_Wide = _Newwidth;
return (_Oldwidth);
}
ios_base::fmtflags fmt;
fmt=cout.setf(ios_base::right,ios_base::adjustfield);
ios_base::fmtflags fmt;
fmt=cout.setf(ios_base::right,ios_base::adjustfield);