GREEN: add coversion rule for 40
This commit is contained in:
parent
e411e38a31
commit
bef6a56d06
1 changed files with 8 additions and 1 deletions
|
|
@ -1,5 +1,12 @@
|
|||
String integerToRoman(int number) {
|
||||
const conversionRules = [(10, 'X'), (9, 'IX'), (5, 'V'), (4, 'IV'), (1, 'I')];
|
||||
const conversionRules = [
|
||||
(40, 'XL'),
|
||||
(10, 'X'),
|
||||
(9, 'IX'),
|
||||
(5, 'V'),
|
||||
(4, 'IV'),
|
||||
(1, 'I'),
|
||||
];
|
||||
|
||||
final result = StringBuffer();
|
||||
var remaining = number;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue