[問題]draw a hollow square surrounded by stars
這題目想了 幾小時 有點不了解 為什麼 這樣寫
哪位好心人 能指導一下方向 去解讀嗎?
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
討論串 (同標題文章)