Why Doesn't XIV follow the Normal Rules?
Hi, I am trying to decode roman numerals with python, and it works for all other numbers such as "IV" or "MMVIII". But for "XIV", I am getting 16, while the answer should be 14. According to the rules, you should add if a small number comes after a big number. And if a big number comes after a small number you should subtract. So I am not sure why "XIV" doesn't follow that!
Can you please explain the process?
XIV would be 10 + ( 5 - 1 ) = 14. There is probably an error in whatever translator you are using. Why don't you try to code your own?
also, to answer your previous question, in plain english, XIV would be (10)(1)(5) where X = 10, I = 1, and V = 5
to create other numbers, different combinations of the different roman numberals are used. Here is 1-10 in Roman Numerals
I = 1
II = 2
III = 3
IV = 4
V = 5
VI = 6
VII = 7
VIII = 8
IX = 9
X = 10