A few days ago
Anonymous

Convert Roman Numeral to Arabic in Java?

Hey, I need help converting Roman Numeral back to Arabic in java. In that code need to be also question> convert arabic number to roman!!thanks dudes!!

Top 1 Answers
A few days ago
Anonymous

Favorite Answer

I don’t know Java, but I do know several other programming languages.

I would put the Roman Numeral # into a string that can address each element individually.

I would have a table of conversions

I 1

V 5

X 10

etc.

Then the conversion routines would need to consider the placement in the original string, in addition to the values

IV becomes 5 minus 1

VI becomes 5 plus 1

I guess I would search for the highest roman value, then examine what’s adjacent to it

Basically we write down the process by which a human does it, put that in a series of steps for the program to do likewise.

0