Revision of Class 9 (3): Conditional Statements, Loops and Nested Loops - ICSE Class 10 Computer Applications Notes, Diagrams and Solved Questions

if-else, switch and fall-through, for, while and do-while, break and continue, number programs and patterns with nested loops, with dry runs you can step through.

In this chapter

  • if, if-else, the if-else-if ladder and nested if
  • switch-case, break, default and fall-through, with a try-it explorer
  • for, while and do-while: entry- and exit-controlled loops
  • break, continue, the stray semicolon and off-by-one traps
  • Digit programs: sum, reverse, palindrome, prime, factorial and series
  • Nested loops and patterns, with a step-by-step dry run
  • Special numbers: Armstrong, perfect, Niven, Spy, Neon, automorphic, Buzz