Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: At the risk of saying something stupid-but-obvious about Roman Numerals

by Limbic~Region (Chancellor)
on May 12, 2014 at 19:49 UTC ( [id://1085825]=note: print w/replies, xml ) Need Help??


in reply to At the risk of saying something stupid-but-obvious about Roman Numerals

sundialsvc4,
Something seems fishy with your code.
my $roman = "MCCMLXXIV"; #1874
Shouldn't that be MDCCCLXXIV? I am pretty sure what you have isn't valid.

Cheers - L~R

  • Comment on Re: At the risk of saying something stupid-but-obvious about Roman Numerals
  • Download Code

Replies are listed 'Best First'.
Re^2: At the risk of saying something stupid-but-obvious about Roman Numerals
by Anonymous Monk on May 12, 2014 at 23:28 UTC

    Or even, MDCCCLXXIIII. Romans probably treated the numbers like a bag of coins. To add two numbers, just lump them together. Substractive forms (IV, IX, XL, XC, CD, CM), and even double substractives (such as CCM) would also occur, according to wikipedia.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1085825]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-24 05:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found