I just saw a video and hey they are right here in this!
To be continued... as soon as I get it coded ;-))
Meanwhile wonder WTH?
Oh better yet, try to anticipate where I am going with this.
Code: (Select All)
_Title "Pascal Triangle display exercise 2018-01-13 bplus"
'2018-01-13 Pascal Triangle.txt for JB 2015-10-31 MGA/B+
_Define A-Z As _INTEGER64
Const xmax = 1200
Const ymax = 400
Screen _NewImage(xmax, ymax, 32)
_ScreenMove 100, 60
printline = 2
For row = 0 To 20
build$ = ""
printline = printline + 1
For column = 0 To row
build$ = build$ + Right$(Space$(7) + Str$(binom(row, column)), 7)
Next
Locate printline, (150 - Len(build$)) / 2
Print build$
Next
Sleep
Function binom (n, m)
binom = fac(n) / (fac(m) * fac((n - m)))
End Function
Function fac (n)
f = 1
For i = 1 To n
f = f * i
Next
fac = f
End Function
To be continued... as soon as I get it coded ;-))
Meanwhile wonder WTH?
Oh better yet, try to anticipate where I am going with this.
b = b + ...