作者TikalCelts (Σ.﹒‧°★)
看板C_and_CPP
标题[问题]draw a hollow square surrounded by stars
时间Sat Mar 21 14:28:44 2009
这题目想了 几小时 有点不了解 为什麽 这样写
哪位好心人 能指导一下方向 去解读吗?
while ( row <= stars )
{
column = 1;
while ( column <= stars )
{
if ( row == 1 )
cout << "*";
else if ( row == stars )
cout << "*";
else if ( column == 1 )
cout << "*";
else if ( column == stars )
cout << "*";
else
cout << " ";
column++;
} // end inner while
cout << endl;
row++;
thx .
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.47.194.53