Menu

[r246]: / XPASTRI.MPL  Maximize  Restore  History

Download this file

18 lines (12 with data), 291 Bytes

// THIS PROGRAM DRAWS PASCAL'S TRIANGLE

##LIBHDR

.SIZE:14
.PREV=!.SIZE PREV=.PREV
.NEXT=!.SIZE NEXT=.NEXT

.(;I,J) [
  PREV!1=1;
  I=0;++I<.SIZE @ [
    WRITET(0,<<(.SIZE-I));
    J=0;++J<=I @ WRITED(NEXT!J=PREV!J+PREV!(J-1),4);
    NEWLINE();J=PREV;PREV=NEXT;NEXT=J
]]

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.