Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
17
Task/Pascals-triangle/XBasic/pascals-triangle.basic
Normal file
17
Task/Pascals-triangle/XBasic/pascals-triangle.basic
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
PROGRAM "pascal"
|
||||
VERSION "0.0001"
|
||||
|
||||
DECLARE FUNCTION Entry()
|
||||
|
||||
FUNCTION Entry()
|
||||
r@@ = UBYTE(INLINE$("Number of rows? "))
|
||||
FOR i@@ = 0 TO r@@ - 1
|
||||
c%% = 1
|
||||
FOR k@@ = 0 TO i@@
|
||||
PRINT FORMAT$("####", c%%);
|
||||
c%% = c%% * (i@@ - k@@) / (k@@ + 1)
|
||||
NEXT k@@
|
||||
PRINT
|
||||
NEXT i@@
|
||||
END FUNCTION
|
||||
END PROGRAM
|
||||
Loading…
Add table
Add a link
Reference in a new issue