Skip to content

while loops · ⁨while 循环⁩

English

while repeats

  • while (test) { ... } runs again and again, as long as the test stays true.
  • It checks the test before each pass — so the body might run zero times.
中文

while 重复

  • while (test) { ... } 一遍又一遍地运行,只要测试一直为 true。
  • 它在每一轮之前检查测试 —— 所以循环体有可能一次都不运行。

Log in or create account · ⁨登录或创建账户⁩

IGCSE, A-Level · ⁨IGCSE、A-Level⁩ & AP · ⁨与 AP⁩