Java Utililty Methods Integer to Roman

List of utility methods to do Integer to Roman

Description

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

Method

StringIntegerToRoman(int n)
Integer To Roman
String roman = "";
int repeat;
int magnitude[] = { 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1 };
String symbol[] = { "M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I" };
repeat = n / 1;
for (int x = 0; n > 0; x++) {
    repeat = n / magnitude[x];
    for (int i = 1; i <= repeat; i++) {
...
StringintegerToRoman(int n)
Convert integer to a Roman numeral.
StringBuffer result = new StringBuffer();
int i = 0;
while (n > 0) {
    while (n >= integerValues[i]) {
        result.append(romanNumerals[i]);
        n -= integerValues[i];
    i++;
...