Nested Fixed Loops

A nested fixed loop is a loop within a loop, that is iterated a fixed number of times.

This is written in pseudocode like this

  • For X = 1 to 10
    • For Y = 1 to 10
      • Display X & Y
    • Next Y
  • Next X

The program above will display

  • 1 1
  • 1 2
  • 1 3
  • ..
  • 2 1
  • 2 2
  • 2 3
  • ..
  • ..
  • 10 1
  • 10 2
  • 10 3
  • ..

Create the following programs

  1. Display a triangle of stars
  2. Display the first 10 times tables
  3. Display a number grid of the first 10 times tables

OK the second program can be done without the nested loop (as I have shown). However, there is a nested loop solution, can you solve it?