N'th: Difference between revisions
→{{header|Batch File}}: Fixed 11tth, 12th and 13th
Walterpachl (talk | contribs) (→{{header|REXX}}: Refurbished and two alternate solutions added to the oiginal) |
(→{{header|Batch File}}: Fixed 11tth, 12th and 13th) |
||
Line 926:
setlocal enabledelayedexpansion
for /l %%n in (%~1,1,%~2) do (
if !curr_num:~-2!==11 (set "out=%%nth")
set "range_output=!range_output! !out!"▼
if !curr_num:~-2!==12 (set "out=%%nth")
if !curr_num:~-2!==13 (set "out=%%nth")
)
echo."!range_output:~1!"
goto :EOF</syntaxhighlight>
{{Out}}
<pre>
"250th 251st 252nd 253rd 254th 255th 256th 257th 258th 259th 260th 261st 262nd 263rd 264th 265th"
"1000th 1001st 1002nd 1003rd 1004th 1005th 1006th 1007th 1008th 1009th 1010th
Press any key to continue . . .
</pre>
=={{header|BBC BASIC}}==
|