โœ๏ธ

Fix the countdown

Medium๐Ÿท๏ธ Debugging๐Ÿ“‚ Trace, Debug & Test
๐Ÿงฉ The problem

This program should count down from N to 1, but it never stops! Find the bug and fix it.

SET N = 3 โ€ฆ WHILE N > 0 โ€ฆ DISPLAY N โ€ฆ END WHILE

Examples

  • Input: 3 โ†’ 3 โŽ 2 โŽ 1

โœ๏ธ Write your pseudocode

Press Run to watch it step by step, and Run tests to check it against every test case.

โ† All practice problems