看板 [ java ]
討論串[問題] 關於for回圈
共 8 篇文章
首頁
上一頁
1
2
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者NightPrince (shooting star)時間19年前 (2006/06/02 20:48), 編輯資訊
0
0
0
內容預覽:
你第一個for迴圈結束後, i就被回收了. 所以你第二個迴圈要用i的時候. compiler當然不知道 i 是啥囉. --. 發信站: 批踢踢實業坊(ptt.cc). ◆ From: 59.116.171.4.

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者qrtt1 (隱者)時間19年前 (2006/06/02 20:40), 編輯資訊
0
0
1
內容預覽:
但是嚴格說起來這麼寫沒效果:). qrtt1@ubuntu:~/test$ g++ for.cpp -Wall. for.cpp: In function ‘int main()’:. for.cpp:10: warning: statement has no effect. qrtt1@ubunt
(還有2266個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者CMJ0121 (請多指教!!)時間19年前 (2006/06/02 20:32), 編輯資訊
0
0
0
內容預覽:
public class test. {. public static void main(String[] args). {. int i=0;. for(i=0; i<100; ++i). if(i==3). break;. for(i;i<100;++i). System.out.printl
(還有158個字)
首頁
上一頁
1
2
下一頁
尾頁