Thursday, June 11, 2026

Nested For Loop Examples

Total = 0

FOR Row = 1 TO MaxRow

  RowTotal = 0

  FOR Column = 1 TO 10

     RowTotal <-- RowTotal + Amount[Row, Column]

   ENDFOR Column

 OUTPUT "Total for Row", Row, "is", RowTotal

 Total <-- Total + RowTotal

ENDFOR Row

OUTPUT " The grand total is", Total

No comments:

Folk Arts of India

Madhubani Painting   - Region: Mithila, Bihar   - Period: Ancient (references from Ramayana)   - Artists: Traditionally, women   - Themes...