Convert between Arabic Numerals and Roman Numerals
To compile and test the latest source code:
- open a command prompt or terminal in the parent folder of where you want to download NumeralConverter to
git clone https://github.com/Walkman100/NumeralConverter.git
cd NumeralConverter
# on windows:
compile
numeralconverter -h
# on linux:
make
mono numeralconverter.exe -h- On Linux, either:
- rename the file to
numeralconverterto be able to just domono numeralconverter -h - create a
numeralconverterscript in/usr/bin(or/bin) with the contents of:
- rename the file to
#!/bin/sh
mono /full/path/to/numeralconverter.exe $@then chmod 777 it and you should be able to just do numeralconverter -h from any folder.
You can download the NumeralConverterWindows.bat file and put it in the same folder as the executable to use the program without opening a command prompt first.
To use from the command prompt, from the program folder:
> numeralconverter -h
Usage: numeralconverter.exe [-h|-r [roman number]|-a [arabic number]]
> numeralconverter -r CMXCIX
999
> numeralconverter -a
Enter Arabic number: 543
DXLIII
> numeralconverter -a 543
DXLIII
> numeralconverter
Input Arabic or Roman number? (a/r): a
Enter Arabic number: 543
DXLIII
> numeralconverter -a 543 > output.txtContents of output.txt will be DXLIII.
See the MonoTests folder in VBNCW to make sure you have mono and vbnc up and running, then from the program folder:
> mono numeralconverter.exe -h
Usage: numeralconverter.exe [-h|-r [roman number]|-a [arabic number]]
> mono numeralconverter.exe -r CMXCIX
999
> mono numeralconverter.exe -a
Enter Arabic number: 543
DXLIII
> mono numeralconverter.exe -a 543
DXLIII
> mono numeralconverter.exe
Input Arabic or Roman number? (a/r): a
Enter Arabic number: 543
DXLIII
> mono numeralconverter.exe -a 543 > output
> cat output
DXLIII