Hello

Hi I am new to C++
I am trying to write Roman Numeral converter from roman to arabic.

I am getting error on this loop.

please help me

IV - 4
IX - 9
XL - 40
XC - 90
CD - 400
CM - 900

when I input IV It gives me answer 4.
when I input IX It gives me error. It should give me answer 9.

thanks :)
Last edited on
Could you show the complete program? That may help.
check it again
@abbeyp03, what did you post the hyper link for?
Uh, sorry abbeyp03, but this is not a JavaScript forum. And don't post completely unrelated links.
nobody is gonna help me?
closed account (D80DSL3A)
The for loop on line 36 goes one value too far. Try: for(int j = 0; j < length-1; j++) on that line.
This is because of the indexing to j+1 in the body of that loop.
Last edited on
@fun2code, you are my hero thanks
Topic archived. No new replies allowed.