rows = 10 n = 0 for r = 1 to rows for c = 1 to r n = n + 1 see string(n) + " " next see nl next