public static int convertRomanNumeral(String numeral)
{
return numeral.replace("M", "DD")
.replace("CD", "CCCC")
.replace("D", "CCCCC")
.replace("C", "LL")
.replace("XL", "XXXX")
.replace("L", "XXXXX")
.replace("X", "VV")
.replace("IV", "IIII")
.replace("V", "IIIII")
.length();
}
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments