[REBOL] Lesson #2 - Converting Roman Numericals
From: gmassar::dreamsoft::com at: 23-Oct-2000 10:06
Geo's Helping Tutorials
Lesson #2 - Converting Roman Numericals
Write a function (or a script) in REBOL that converts a given Roman
numerical to its decimal equivalent in range of 1 thru 3999. Returns
'none if invalid numerical. E.g.,
IX --> 9
LXXXI --> 81
MCMLII --> 1952
MMI --> 2001
MIM --> none (invalid)
MMMCMXCIX --> 3999
For those who remember vaguely what each Roman character represents:
I = 1 V = 5 X = 10 L = 50 C = 100 D = 500 M = 1000
(Please correct me if I am wrong.)
BONUS: Write a function (or a refinement) that does the reverse of the
SUBMISSION: Please send your code (either function or script) to my
email address at [gmassar--dreamsoft], not this list. Due: Friday, Oct. 27.
A reasonably good solution or two will be selected to post at Rebol_New
eGroup for "class discussion".
Your help will be much appreciated.
Geo... helping tutor