Skip to content

Iteration: WHILE and REPEAT · ⁨迭代:WHILE 与 REPEAT⁩

English

WHILE tests first

  • A pre-condition loop tests the condition, then maybe runs the body.
  • If the condition is already FALSE, the body never runs.
  • The block ends at ENDWHILE.
中文

WHILE 先判断

  • 前测试循环先判断条件,然后才可能运行循环体。
  • 如果条件一开始就是 FALSE,循环体一次也不运行。
  • 这一段在 ENDWHILE 结束。

Handout

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

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