G
G
Gagatyn2016-09-29 23:01:56
C++ / C#
Gagatyn, 2016-09-29 23:01:56

How to decode roman number notation?

Decode the Roman notation for any number of digits. Rules: I -> 1, V -> 5, X -> 10, L -> 50, C -> 100, D -> 500, M -> 1000. The value of a Roman numeral does not depend on the position, but the sign does.
How to make such a program in c++ console? I can't figure it out, there are too many operations, even though the letters are repeated.
ummm... it is necessary to equate to 10 lines the symbols, Roman from IX, if the number is 11 then write X and add the first line. Difficult
And if you take an array and equate the Roman numerals from IX, and then ... links ... ???

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pi314, 2016-09-29
@Gagatyn

Just like any other non-positional number system ... something like this . Read, understand, write your own program;)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question