Comment revisions

This commit is contained in:
Arogon1
2019-12-10 23:35:54 -05:00
parent 862ac23992
commit 79d29c0bd3
10 changed files with 42 additions and 12 deletions

View File

@ -1,9 +1,29 @@
package Conversions;
/**
* Converting Integers into Roman Numerals
*
*('I', 1);
*('IV',4);
*('V', 5);
*('IV',9);
*('X', 10);
*('XL',40;
*('L', 50);
*('XC',90);
*('C', 100);
*('D', 500);
*('M', 1000);
*
*/
public class IntegerToRoman {
private static int[] allArabianRomanNumbers = new int[]{1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1};
private static String[] allRomanNumbers = new String[]{"M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"};
//Value must be > 0
public static String integerToRoman(int num) {
if (num <= 0) {
return "";