Skip to content · ⁨Saltar al contenido⁩

Loops: while, for, and accumulation · ⁨Bucles: while, for y acumulación⁩

English

Repeating work

  • A loop runs the same block of code many times, so you don't copy it by hand.
  • C has three loops: while, for, and do-while. They all repeat while a condition is true.
  • The condition is checked each time around. When it becomes false, the loop stops.
Español

Trabajo repetitivo

  • Un bucle ejecuta el mismo bloque de código muchas veces, por lo que no es necesario copiarlo manualmente.
  • C tiene tres bucles: while, for y do-while. Todos repiten mientras una condición sea verdadera.
  • La condición se verifica en cada vuelta. Cuando se vuelve falsa, el bucle termina.

Handout · ⁨Material⁩

Log in or create account · ⁨Iniciar sesión o crear cuenta⁩

IGCSE, A-Level & AP