Largest int from concatenated ints: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: minor word change in the REXX section header.) |
|||
Line 1,647: | Line 1,647: | ||
This REXX version works with any integer (negative, zero, positive), and does some basic error checking to |
This REXX version works with any integer (negative, zero, positive), and does some basic error checking to |
||
<br>verify that the numbers are indeed integers (and it also normalizes the integers). |
<br>verify that the numbers are indeed integers (and it also normalizes the integers). |
||
<br>For negative numbers |
<br>For negative numbers their absolute value is used. |
||
<lang rexx>/*REXX program constructs the largest integer from an integer list using concatenation.*/ |
<lang rexx>/*REXX program constructs the largest integer from an integer list using concatenation.*/ |
||
@.=.; @.1 = '{1, 34, 3, 98, 9, 76, 45, 4}' /*the 1st integer list to be used. */ |
@.=.; @.1 = '{1, 34, 3, 98, 9, 76, 45, 4}' /*the 1st integer list to be used. */ |