List of utility methods to do Decimal to Roman
String | decimal2roman(int src) decimalroman char digits[] = { 'I', 'V', 'X', 'L', 'C', 'D', 'M' }; String thousands = "", result = ""; int rang, digit, i; for (i = src / 1000; i > 0; i--) { thousands += "M"; src %= 1000; rang = 0; ... |
String | decimalToRoman(int binary, boolean oldFashion) decimal To Roman if (binary <= 0 || binary >= 4000) { throw new NumberFormatException("Value outside roman numeral range."); String roman = ""; for (int i = 0; i < RCODE_1.length; i++) { while (binary >= BVAL[i]) { binary -= BVAL[i]; roman += oldFashion ? RCODE_2[i] : RCODE_1[i]; ... |