Added first version of roman numerals
parent
1ba9e13433
commit
ea56899f03
|
@ -0,0 +1,21 @@
|
|||
use Roman;
|
||||
|
||||
if (!$type && $q_check =~ /^(?:(?:roman|arabic))?\s*([mdclxvi]+)$/i) {
|
||||
|
||||
$answer_results = arabic $1;
|
||||
|
||||
if ($answer_results) {
|
||||
$answer_type = 'roman';
|
||||
$type = 'E';
|
||||
}
|
||||
} elsif (!$type && $q_check =~ m/^roman ([0-9]+)$/i) {
|
||||
|
||||
$answer_results = uc(roman($1));
|
||||
|
||||
if ($answer_results) {
|
||||
$answer_type = 'roman';
|
||||
$type = 'E';
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
roman xii
|
||||
roman mmcml
|
||||
roman 2344
|
||||
arabic cccxlvi
|
||||
mcmiv
|
Loading…
Reference in New Issue