Skip to content · ⁨Saltar al contenido⁩

Above average · ⁨Por encima del promedio⁩

English

Above average

Two loops, one after the other: the first works out the average, the second keeps the numbers above it.

This joins two patterns you have already used, the running total and the filter. Solving a problem in stages like this is how most longer programs are built.

Español

Por encima del promedio

Dos bucles, uno tras otro: el primero calcula el promedio, el segundo conserva los números que están por encima de él.

Esto combina dos patrones que ya has utilizado: la suma acumulada y el filtro. Resolver un problema en etapas de esta manera es como se construyen la mayoría de los programas más largos.

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

IGCSE, A-Level & AP