Nested for Loops - ICSE Class 9 Computer Applications Notes, Diagrams and Solved Questions

A loop inside a loop: square, rectangle and right-triangle patterns of numbers and characters, and series.

In this chapter

  • What a nested loop is, and how many times the inner loop runs
  • Square and rectangle patterns
  • Right-angled triangle patterns, growing and upside down
  • Number patterns, including Floyd's triangle
  • Character patterns using char loops and (char) casts
  • break and continue inside nested loops
  • Series with nested loops: sums of factorials and multiples tables