HP Forums
(49G) Pascal's Triangle - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: General Software Library (/forum-13.html)
+--- Thread: (49G) Pascal's Triangle (/thread-4617.html)



(49G) Pascal's Triangle - Gerald H - 09-01-2015 06:45 PM

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
  ;
;