Microsoft Small Basic

Program Listing: QVB169
n = 9
For r = 1 To 7
For c = 1 To 7
num[r][c] = n
n = n + 1
EndFor
EndFor
Count = 2
For Next = 1 To 8
TextWindow.Write(next+":")
p = 1
TextWindow.Write(p+"-")
For pic = 1 To 7
TextWindow.Write(count+"-")
Count = Count + 1
EndFor
TextWindow.WriteLine("")
EndFor
c = 1
For Next = 9 To 15
p = 2
TextWindow.Write(next+":")
TextWindow.Write(p+"-")
r = 1
For pic = 1 To 7
TextWindow.Write(num[r][c]+"-")
r = r + 1
c = c + 0
EndFor
c = c + 1
TextWindow.WriteLine("")
EndFor
c = 1
For Next = 16 To 22
p = 3
TextWindow.Write(next+":")
TextWindow.Write(p+"-")
r = 1
For pic = 1 To 7
TextWindow.Write(num[r][c]+"-")
r = r + 1
c = c + 1
If c > 7 Then
c = c - 7
endif
EndFor
c = c + 1
TextWindow.WriteLine("")
EndFor
c = 1
For Next = 23 To 29
p = 4
TextWindow.Write(next+":")
TextWindow.Write(p+"-")
r = 1
For pic = 1 To 7
TextWindow.Write(num[r][c]+"-")
r = r + 1
c = c + 2
If c > 7 Then
c = c - 7
endif
EndFor
c = c + 1
TextWindow.WriteLine("")
EndFor
c = 1
For Next = 30 To 36
p = 5
TextWindow.Write(next+":")
TextWindow.Write(p+"-")
r = 1
For pic = 1 To 7
TextWindow.Write(num[r][c]+"-")
r = r + 1
c = c + 3
If c > 7 Then
c = c - 7
endif
EndFor
c = c + 1
TextWindow.WriteLine("")
EndFor
c = 1
For Next = 37 To 43
p = 6
TextWindow.Write(next+":")
TextWindow.Write(p+"-")
r = 1
For pic = 1 To 7
TextWindow.Write(num[r][c]+"-")
r = r + 1
c = c + 4
If c > 7 Then
c = c - 7
endif
EndFor
c = c + 1
TextWindow.WriteLine("")
EndFor
c = 1
For Next = 44 To 50
p = 7
TextWindow.Write(next+":")
TextWindow.Write(p+"-")
r = 1
For pic = 1 To 7
TextWindow.Write(num[r][c]+"-")
r = r + 1
c = c + 5
If c > 7 Then
c = c - 7
endif
EndFor
c = c + 1
TextWindow.WriteLine("")
EndFor
c = 1
For Next = 51 To 57
p = 8
TextWindow.Write(next+":")
TextWindow.Write(p+"-")
r = 1
For pic = 1 To 7
TextWindow.Write(num[r][c]+"-")
r = r + 1
c = c + 6
If c > 7 Then
c = c - 7
endif
EndFor
c = c + 1
TextWindow.WriteLine("")
EndFor