Commit 72b71807 authored by Colin DAMON's avatar Colin DAMON
Browse files

Refacto six conversion

parent 0e4a9564
...@@ -3,12 +3,8 @@ package fr.ippon.kata.numeral; ...@@ -3,12 +3,8 @@ package fr.ippon.kata.numeral;
public class Numerals { public class Numerals {
public static String toRoman(int arabic) { public static String toRoman(int arabic) {
if (arabic == 6) { if (arabic >= 5) {
return "VI"; return "V" + toRoman(arabic - 5);
}
if (arabic == 5) {
return "V";
} }
if (arabic == 4) { if (arabic == 4) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment