Post Reply 
(49G) Pascal's Triangle
09-01-2015, 06:45 PM (This post was last modified: 06-15-2017 01:44 PM by Gene.)
Post: #1
(49G) Pascal's Triangle
For integer input N the programme returns the Nth row of Pascal's triangle, [edit] starting with line one.

Code:

::
  CK1&Dispatch
  BINT1
  ::
    {
      Z1_
    }
    SWAP
    COERCEDUP
    BINT2
    #<case
    DROP
    #1-
    ZERO_DO
    FPTR2 ^PASCAL_NEXTLINE
    LOOP
  ;
;
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)