Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/Pascals-triangle/Liberty-BASIC/pascals-triangle.basic
Normal file
19
Task/Pascals-triangle/Liberty-BASIC/pascals-triangle.basic
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
input "How much rows would you like? "; n
|
||||
dim a$(n)
|
||||
|
||||
for i= 0 to n
|
||||
c = 1
|
||||
o$ =""
|
||||
for k =0 to i
|
||||
o$ =o$ ; c; " "
|
||||
c =c *(i-k)/(k+1)
|
||||
next k
|
||||
a$(i)=o$
|
||||
next i
|
||||
|
||||
maxLen = len(a$(n))
|
||||
for i= 0 to n
|
||||
print space$((maxLen-len(a$(i)))/2);a$(i)
|
||||
next i
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue