Skip to content

paulouskin/number_converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Roman Numerals conversion

Values

SymbolValue
I1
V5
X10
L50
C100
D500
M1000

Additive and Subtractive Principles

Generally, Roman numerals are written in descending order from left to right, and are added sequentially, for example MMVI (2006) is interpreted as 1000 + 1000 + 5 + 1.
Certain combinations employ a subtractive principle, which specifies that where a symbol of smaller value precedes a symbol of larger value, the smaller value is subtracted from the larger value, and the result is added to the total. For example, in MCMXLIV (1944), the symbols C, X and I each precede a symbol of higher value, and the result is interpreted as 1000 plus (1000 minus 100) plus (50 minus 10) plus (5 minus 1).

To run:

mvn clean install

mvn exec:java -Dexec.mainClass=converter.commandline.CommandLineConverter -Dexec.args="your_roman_numeral"

About

Roman numbers converter OOP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages