Java Utililty Methods Decimal to Roman

List of utility methods to do Decimal to Roman

Description

The list of methods to do Decimal to Roman are organized into topic(s).

Method

Stringdecimal2roman(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;
...
StringdecimalToRoman(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];
...