Largest int from concatenated ints: Difference between revisions

Content added Content deleted
m (→‎{{header|REXX}}: added comments in the REXX section header. -- ~~~~)
Line 282: Line 282:


=={{header|REXX}}==
=={{header|REXX}}==
The algorithm used is based on exact comparisons (left to right) with right digit fill of the left digit.
The algorithm used is based on exact comparisons (left to right) with right digit fill of the left digit.   This allows the integers to be of any size.
<br><br>This REXX example doesn't do any error checking/verifying that:
* the numbers are in fact, numbers
* the numbers are positive integers &nbsp; (however, zeroes will work correctly)
* the integer numbers are well formed
* the lists are well formed
* the list isn't null
<lang rexx>/*REXX pgm constructs largest integer from a list using concatenation.*/
<lang rexx>/*REXX pgm constructs largest integer from a list using concatenation.*/
@. =
@. =