Data update
This commit is contained in:
parent
8e4e15fa56
commit
72eb4943cb
1853 changed files with 35514 additions and 9441 deletions
20
Task/Pascals-triangle/FutureBasic/pascals-triangle.basic
Normal file
20
Task/Pascals-triangle/FutureBasic/pascals-triangle.basic
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
include "NSLog.incl"
|
||||
NSLogSetTitle( @"Pascal's Triangle" )
|
||||
NSLogSetTextAlignment( NSTextAlignmentCenter )
|
||||
|
||||
clear local fn pyramid( n as int )
|
||||
int v( 20, 20 )
|
||||
v( 0, 1 ) = 1
|
||||
nslog( @"\n 1 " )
|
||||
for int y = 1 to n -1
|
||||
for int x = 1 to y + 1
|
||||
v( y, x ) = v( y - 1, x - 1 ) + v( y - 1, x )
|
||||
nslog( @"%4d \b", v( y, x ) )
|
||||
next
|
||||
nslog( @"" )
|
||||
next
|
||||
end fn
|
||||
|
||||
fn pyramid( 15 )
|
||||
|
||||
handleevents
|
||||
Loading…
Add table
Add a link
Reference in a new issue