Roman numerals/Encode: Difference between revisions
m
→{{header|Kotlin}}: Recovered syntax highlighting.
Not a robot (talk | contribs) (Add 8080 assembly version) |
m (→{{header|Kotlin}}: Recovered syntax highlighting.) |
||
Line 3,035:
=={{header|Kotlin}}==
<lang
1000 to "M",
900 to "CM",
Line 3,072:
}</lang>
{{out}}
<pre>
MCMXC
MDCLXVI
MMVIII
</pre>
fun Int.toRomanNumeral(): String {▼
Alternatively:
▲<lang scala>fun Int.toRomanNumeral(): String {
fun digit(k: Int, unit: String, five: String, ten: String): String {
return when (k) {
|