while 是程式中用來判斷是要重複執行的程式元素,底下的程式示範了一個從1印到9的迴圈程式: int i = 1; while ( i <= 9) { cout << i << " "; i++; } cout << endl; ...
確定! 回上一頁