→ james732:在java板有個很有趣的解法~XD 03/01 22:34
→ snowlike:呵呵..好像停不下來要想辦法break; 03/01 22:44
推 chrisdar:for (int i = 0, j = -1, k = 0;i < 19;++i) { 03/01 23:17
→ chrisdar: j = ((0 == k) || (9 == k) ? -j : j); 03/01 23:17
→ chrisdar: cout << k; 03/01 23:17
→ chrisdar: k += j; 03/01 23:17
→ chrisdar:} 03/01 23:17
→ chrisdar:cout << endl; 03/01 23:17
推 chrisdar:init(j)=-1,1; init(k)=0~9; 03/01 23:20
→ snowlike:那樣會印出零喔@_@ 03/01 23:32
推 chrisdar:那就給原PO自己修改了 Gee~ 03/01 23:36