I need to write a program to verify if a given roman numeral is valid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • legoses
    New Member
    • Sep 2007
    • 1

    I need to write a program to verify if a given roman numeral is valid

    I don't know why, but I'm having a tough time thinking of the best way to do this. I need to parse a string of input roman numerals and output if it is a valid roman numeral or not. Any ideas!! Needs to use strings.

    Thanks in advance.
  • Ganon11
    Recognized Expert Specialist
    • Oct 2006
    • 3651

    #2
    Well, first you should think of all the rules that define what a Roman Numeral is. For instance, it can only contain the letters I, V, X, C, M, L...and maybe a few others I can't think of. Also, what order do these letters have to be in? Once you come up with a good list of rules a roman number has to follow, only then should you think about writing a function to implement these rules.

    Comment

    • joeschnell
      New Member
      • Apr 2007
      • 47

      #3
      you should ask grigoletti, he's real good at this.

      Comment

      Working...