Increasing gaps between consecutive Niven numbers: Difference between revisions

Content added Content deleted
(→‎{{header|zkl}}: added code)
m (→‎add digits in chunks: added wording to the REXX section header.)
Line 205: Line 205:


It is about four times faster than the 1<sup>st</sup> REXX version.
It is about four times faster than the 1<sup>st</sup> REXX version.

The "chunk" method is essentially a sum of several chunks, &nbsp; the sums are found by a table lookup (associative array in REXX).
<lang rexx>/*REXX program finds and displays the largest gap between Niven numbers (up to LIMIT).*/
<lang rexx>/*REXX program finds and displays the largest gap between Niven numbers (up to LIMIT).*/
parse arg lim . /*obtain optional arguments from the CL*/
parse arg lim . /*obtain optional arguments from the CL*/