Loops/With multiple ranges: Difference between revisions
Content added Content deleted
Line 1,889: | Line 1,889: | ||
</pre> |
</pre> |
||
The following version does it in a similar way to PL/I and Algol-60, i.e. without defining a function to process the loop, using a |
The following version does it in a similar way to PL/I and Algol-60, i.e. without defining a function to process the loop, using a ''single'' loop, and without creating a list from which to iterate: |
||
<syntaxhighlight lang="kotlin"> |
<syntaxhighlight lang="kotlin"> |
||
import kotlin.math.abs |
import kotlin.math.abs |