breakとcontinue
break/continueがなかったらwhileとifだけでどう書けるかなとかちょっと考えてた
while (condA) { statementA; if (condB) { break; } statementB; }
は
flag = true; while (condA && flag) { statementA; if (condB) { flag = false; } else { statementB; } }
と書けばよいし、
while (condA) { statementA; if (condB) { continue; } statementB; }
は
while (condA) { statementA; if (condB) { } else { statementB; } }
と書けば良いか