Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/Floyds-triangle/VBScript/floyds-triangle.vb
Normal file
15
Task/Floyds-triangle/VBScript/floyds-triangle.vb
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
' Read the number of rows to use..
|
||||
intRows = WScript.StdIn.ReadLine
|
||||
|
||||
' Get the first number of the final row so we can calculate widths...
|
||||
intLastRowStart = (intRows ^ 2 - intRows) \ 2 + 1
|
||||
|
||||
For i = 1 To intRows
|
||||
intLastRow = intLastRowStart
|
||||
For j = 1 To i
|
||||
k = k + 1
|
||||
WScript.StdOut.Write Space(Len(intLastRow) - Len(k)) & k & " "
|
||||
intLastRow = intLastRow + 1
|
||||
Next
|
||||
WScript.StdOut.WriteLine ""
|
||||
Next
|
||||
Loading…
Add table
Add a link
Reference in a new issue