Convert Decimal to Roman Number


FUNCTION DecToRoman(Decimal: LongInt): STRING;
CONST Numbers: ARRAY[1..13] OF Integer = (1, 4, 5, 9, 10, 40, 50, 90, 100, 400, 500, 900, 1000);
Roman: ARRAY[1..13] OF STRING = ('I', 'IV', 'V', 'IX', 'X', 'XL', 'L', 'XC', 'C', 'CD', 'D', 'CM', 'M');
VAR
i: Integer;
BEGIN
Result := '';
FOR i := 13 DOWNTO 1 DO
WHILE (Decimal >= Numbers[i]) DO
BEGIN
Decimal := Decimal - Numbers[i];
Result := Result + Roman[i];
END;
END;