Skip to content

While loops · ⁨while 循环⁩

English

Loop while a condition is true

  • A while loop repeats as long as its condition is true.
  • It checks the condition before each pass.
  • Use it when you do not know the number of repeats in advance.
中文

当条件为真时循环

  • while 循环会只要条件为真就一直重复。
  • 它在每一轮之前检查条件。
  • 当你事先不知道要重复多少次时,就用它。

Handout

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

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