Skip to content · ⁨본문 바로가기⁩

Count down in twos · ⁨두 개씩 세어 내리기⁩

Count down in twos

n starts at 10. Print 10, 8, 6, 4, 2 using a while loop.

The step does not have to be 1. Check where it stops: from 10 taking 2 each time, the value after 2 is 0, and 0 > 0 is false — so 0 is never printed.

Log in or create account · ⁨로그인 또는 계정 만들기⁩

IGCSE, A-Level & AP