Saltar al contenido
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 lives > 0 the body runs lives-- and tests again; when the test is false it prints game over

Material

Iniciar sesión o crear cuenta

IGCSE, A-Level & AP