showing results for - "convert decimal to roman numerals"
Nour
14 Jan 2019
1function convertToRoman(num) 
2{
3  let map = {
4    1000 : "M",
5    900 : "CM",
6    500 : "D",
7    400 : "CD",
8    100 : "C",
9    90: "XC",
10    50: "L",
11    40: "XL",
12    10: "X",
13    9: "IX",
14    5: "V",
15    4: "IV",
16    1: "I"
17  }
18  let roman = "";
19  let romankeys = Object.keys(map).reverse();
20  romankeys.forEach((keys) => {
21      while(keys <= num)
22      {
23        roman += map[keys];
24        num -= keys;
25      }
26        
27  });
28  return roman;
29}
30
31//https://www.rapidtables.com/convert/number/how-number-to-roman-numerals.html (The refrence for the Roman Calculator)
32console.log(convertToRoman(20));
queries leading to this page
number to roman numeral converternumber convert to roman numeralscode to convert decimal to roman numbersdecimal numbers to roman numerals converterinteger to roman number conversionconvert to roman numerichow to convert numbers to roman numeralsconvert number to roman numeralsconvert given roman numeral to integerdecimal number to roman numerals programinteger to roman numeral converterconver number to roman numeralsinteger to roman numeralsconverts a roman number to a decimal number decimal to roman converteronline convert decimal to romannumber to roman numeralsdecimal to roman numeralconvert number into roman numeralsnumbers to roman numeralsint to roman numeralsinteger to roman number roman numerals to decimalinteger to roman numeral translatorconvet decimal to romandecimal to roman 5cnumbers to roman numerals converterroman numeral to decimalconvert decimal to romanconvert roman numerals to numbershow to convert roman numerals to numbersdecimal to romanhow to convert roman numerals to decimalinteger to roman numeraldecimal to roman codeconvert int to roman numeralconvert roman numerals to decimalgiven a number in roman numeral format 2c convert it to decimal decimals in roman numeralsconvert decimal to roman numeral algorithmdecimal to roman conversiondecimal numbers roman numeralsnumeral to roman numeral converternumber to roman numeralsconvert a roman numeral to an integernumber to roman numerals converterdecimal to roman number programdecimal number to roman numeralsnumeric to roman numeral converterconvert decimal to roman numerals