初學者教程之迴圈
外觀
while (myInt < 10){
// do things...
myInt++;
}
do 迴圈類似於 while 迴圈,但它始終至少執行一次。
do {
// do things...
} while (myVar != false);
for (int i=0; i < 10; i++){
if (i == 10)
break;
if (i % 2 == 0)
continue;
// do things
}