Skip to content
Permalink
Browse files

6 => VI, 60 => LX, 600 => DC

  • Loading branch information
michaelbannister committed Jul 10, 2016
1 parent d8060c6 commit 5f0a68b714e6608588609c7d3a3cac414c570dfe
Showing with 3 additions and 1 deletion.
  1. +1 −0 src/main/kotlin/RomanNumerals.kt
  2. +2 −1 src/test/kotlin/DecimalToRomanConverterTest.kt
@@ -9,6 +9,7 @@ fun Int.toRoman(): String {
in 1..3 -> one().repeat(it.multiplier)
4 -> one() + five()
5 -> five()
6 -> five() + one()
else -> ""
}
}.joinToString(separator = "")
@@ -32,7 +32,8 @@ class DecimalToRomanConverterTest {
arrayOf(500, "D"),
arrayOf(1555, "MDLV"), // again, just checking
arrayOf(4, "IV"),
arrayOf(444, "CDXLIV") // again, just checking
arrayOf(444, "CDXLIV"), // again, just checking
arrayOf(666, "DCLXVI")
)

@Test

0 comments on commit 5f0a68b

Please sign in to comment.
You can’t perform that action at this time.