N'th: Difference between revisions
Content added Content deleted
(→{{header|XBasic}}: Removed unnecessary spaces before numbers) |
|||
Line 2,763:
<lang xbasic>
PROGRAM "nth"
VERSION "0.
DECLARE FUNCTION Entry()
Line 2,779:
nMod100@@ = n&& MOD 100
SELECT CASE TRUE
CASE (nMod10@@ = 1) AND (nMod100@@ <> 11):
CASE (nMod10@@ =
CASE (nMod10@@ = 3) AND (nMod100@@ <> 13):
RETURN ("rd")
CASE ELSE:
RETURN ("th")
END SELECT
END FUNCTION
Line 2,788 ⟶ 2,792:
FUNCTION PrintImages(loLim&&, hiLim&&)
FOR i&& = loLim&& TO hiLim&&
PRINT TRIM$(STRING$(i&&)); Suffix$(i&&); " ";
NEXT
PRINT
Line 2,796 ⟶ 2,800:
{{out}}
<pre>
</pre>
|