Use A rather than G for roman numeral 5000

This commit is contained in:
Eric Fredricksen
2022-01-05 13:12:41 -08:00
parent e3c564529d
commit c7911ffbca
3 changed files with 5 additions and 5 deletions
+5 -5
View File
@@ -976,14 +976,14 @@ begin
end;
end;
// I V X L C D M G T P E
// I V X L C D M A T P E
// 1 5 10 50 100 500 1000 5000 10000 50000 100000
function IntToRoman(n: Integer): String;
begin
while Rome(n, 10000, Result, 'T') do ;
Rome(n, 9000, Result, 'MT');
Rome(n, 5000, Result, 'G');
Rome(n, 4000, Result, 'MG');
Rome(n, 5000, Result, 'A');
Rome(n, 4000, Result, 'MA');
while Rome(n, 1000, Result, 'M') do ;
Rome(n, 900, Result, 'CM');
Rome(n, 500, Result, 'D');
@@ -1004,8 +1004,8 @@ begin
Result := 0;
while UnRome(n, 10000, Result, 'T') do ;
UnRome(n, 9000, Result, 'MT');
UnRome(n, 5000, Result, 'G');
UnRome(n, 4000, Result, 'MG');
UnRome(n, 5000, Result, 'A');
UnRome(n, 4000, Result, 'MA');
while UnRome(n, 1000, Result, 'M') do ;
UnRome(n, 900, Result, 'CM');
UnRome(n, 500, Result, 'D');