Conditional Statements - ICSE Class 9 Computer Applications Notes, Diagrams and Solved Questions

if, if-else, if-else-if ladders, nested if, switch-case with break and fall-through, and menu-driven programs.

In this chapter

  • Flow of control, conditions, and relational and logical operators
  • The if and if-else statements
  • The if-else-if ladder and slab-system programs like electricity bills
  • Nested if and the dangling else
  • switch-case with default and break
  • Fall-through, grouped cases, menu-driven programs and System.exit(0)
  • Choosing if or switch, the ternary operator and common mistakes