RosettaCodeData/Task/Pascals-triangle/Microsoft-Small-Basic/pascals-triangle.basic
2023-07-01 13:44:08 -04:00

11 lines
266 B
Text

TextWindow.Write("Number of rows? ")
r = TextWindow.ReadNumber()
For i = 0 To r - 1
c = 1
For k = 0 To i
TextWindow.CursorLeft = (k + 1) * 4 - Text.GetLength(c)
TextWindow.Write(c)
c = c * (i - k) / (k + 1)
EndFor
TextWindow.WriteLine("")
EndFor