Pascal's triangle: Difference between revisions
Content added Content deleted
(added a different implementation to the Java solutions.) |
m (→{{header|REXX}}: added NUMERIC DIGITS to handle bigger triangles. -- ~~~~) |
||
Line 1,963: | Line 1,963: | ||
<lang rexx>/*REXX program to display Pascal's triangle, neatly centered/formatted.*/ |
<lang rexx>/*REXX program to display Pascal's triangle, neatly centered/formatted.*/ |
||
/*AKA: Yang Hui's ▲, Khayyam-Pascal ▲, Kyayyam ▲, Tartaglia's ▲ */ |
/*AKA: Yang Hui's ▲, Khayyam-Pascal ▲, Kyayyam ▲, Tartaglia's ▲ */ |
||
numeric digits 300 /*let's be able to handle big ▲. */ |
|||
arg n .; if n=='' then n=10 |
arg n .; if n=='' then n=10 |
||
if n<1 then do; say "***error!*** N can't be non-positive:" n; exit 13;end |
if n<1 then do; say "***error!*** N can't be non-positive:" n; exit 13;end |