Arnulfo
Klasse Decimal_to_Roman
{
public static void main(int decimal)
{
String[] RCODE = {"M", "CM", "D", "CD", "C", "XC", "L","XL", "X", "IX", "V", "IV", "I"};
int[] DVAL = {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1};
Zeichenfolge roman = "";
for (int I = 0; I < RCODE.length; I++)
{
while (dezimal >= DVAL[I])
{
dezimal -= DVAL[I];
römisch += RCODE[I];
}
}
System.out.println(roman);
}
}