roman-numerals Questions

96

How can I convert integers into roman numerals? function romanNumeralGenerator (int) { } For example, see the following sample inputs and outputs: 1 = "I" 5 = "V" 10 = "X" 20 = "XX" 3999 = "MM...
Dative asked 31/1, 2012 at 16:22

17

Solved

Thinking about my other problem, i decided I can't even create a regular expression that will match roman numerals (let alone a context-free grammar that will generate them) The problem is matchin...
Doss asked 6/11, 2008 at 1:29

16

Solved

I try to solve the Leedcode question 13 and the question is Given a roman numeral, convert it to an integer.(Input is guaranteed to be within the range from 1 to 3999.) This is my code below, I won...
Fechner asked 4/4, 2018 at 20:18

24

In data sometimes the same product will be named with a roman numeral while other times it will be a digit. Example Samsung Galaxy SII verses Samsung Galaxy S2 How can the II be converted to the va...
Manvil asked 15/2, 2013 at 17:37

9

Solved

I need to transform ordinary numbers to Roman numerals with php and I have this code: <?php function roman2number($roman){ $conv = array( array("letter" => 'I', "number" => 1), array...
Livvi asked 21/2, 2013 at 5:6

14

Solved

Using PHP, I'd like to convert a string containing a Roman number into its integer representation. I need this because I need to make calculations on them. Wikipedia on Roman numerals It would su...
Higdon asked 7/6, 2011 at 13:5

32

I'm trying to write a function that converts numbers to roman numerals. This is my code so far; however, it only works with numbers that are less than 400. Is there a quick and easy way to do this ...
Accursed asked 12/8, 2011 at 12:46

7

Solved

I had an interview in which I did terribly. So, now I'm trying to find the solution to the question. Here is the interview question: "We have the following mapping: M: 1000, D: 500, C: 100, L: 50...
Buitenzorg asked 13/3, 2015 at 16:24

4

Solved

How do you find a roman numeral equivalent of an integer. Is there a java library which provides this capability? I did find a similar question, but I would prefer an out of the box API abstractio...
Logroll asked 13/10, 2010 at 8:21

29

This is a homework assignment I am having trouble with. I need to make an integer to Roman Numeral converter using a method. Later, I must then use the program to write out 1 to 3999 in Roman nume...
Kenzie asked 19/10, 2012 at 5:28

5

I'm typesetting in LaTeX, and I'd like to display a "variable" (in my case, a reference \ref{blah} to an item number in list) in roman rather than the default arabic. Is there an easy way to do thi...
Misfeasor asked 5/4, 2010 at 15:5

17

Solved

How can I left-align the numbers in an ordered list? 1. an item // skip some items for brevity 9. another item 10. notice the 1 is under the 9, and the item contents also line up Change the cha...
Lovato asked 14/8, 2008 at 10:42

2

Solved

How do I create a roman numeral list in Markdown? Like this... i) Higher per acre field of sugarcane. ii) Higher sucrose content of sugarcane. iii) Lower Labor cost. iv) Longer crushing period.
Jaysonjaywalk asked 20/1, 2018 at 4:53

3

Solved

How can I convert an integer to its String representation in Roman numerals in C ?
Swithbart asked 13/2, 2011 at 20:1

5

Solved

What it means to be proper Roman numerals may vary. For simplicity (no Unicode, no multiplicative principle, no double subtractives, no overbars, no large numbers, etc) for the sake of this questio...
Humble asked 10/5, 2017 at 5:14

1

Solved

basically i am trying to create a function that will turn a Roman numeral into a integer. I have an array: $roman_numerals=[ 'M' => 1000, 'CM' => 900, 'D' => 500, 'CD' => 40...
Selfconceit asked 13/5, 2015 at 14:7

3

Solved

I've been searching forever for some sample code on convert from a number to roman numerals in objective c. Anyone know where I can find a good example? Update: Nevermind, found a PHP function th...
Procathedral asked 9/5, 2011 at 20:17

3

Solved

In R, there is a great function as.roman in the very base setup: as.roman(79) # [1] LXXIX Is there an inverse function that would convert roman numerals to numbers? (I know I can write it myse...
Torrey asked 14/1, 2014 at 15:3

3

Solved

I am trying to figure out how to convert roman numerals to integers. This is a portion of my code. When I prompt the user to enter M it shows 1000, but when I prompt the user to enter a roman numer...
Elishaelision asked 17/7, 2013 at 23:2

3

Solved

The Dragon Book includes an exercise on converting integers to roman numerals using a syntax-directed translation scheme. How can this be completed?
Enlargement asked 6/11, 2008 at 1:3

10

Solved

I have an array containing Roman numerals (as strings of course). Like this: $a = array('XIX', 'LII', 'V', 'MCCXCIV', 'III', 'XIII'); I'd like to sort them according to the numeric values of th...
Heterography asked 28/6, 2011 at 13:52

1

Solved

I need to change my section numbering from Arabic, to Roman, beet keep the Arabic numbering in subsections and subsubsections. For example: I. Section 1.1. Subsection 1.1.1. Subsubsection II. S...
Indecisive asked 10/4, 2011 at 16:18

4

Solved

95 bytes currently in python I,V,X,L,C,D,M,R,r=1,5,10,50,100,500,1000,vars(),lambda x:reduce(lambda T,x:T+R[x]-T%R[x]*2,x,0) Here is the few test results, it should work for 1 to 3999 (assume in...
Tankersley asked 3/12, 2009 at 10:35

31

Write a program that take a single command line argument N and prints out the corresponding Roman Numeral. Eg N = 2009 should print MMIX. Let's say this should work for 0 < N < 3000. ...
Concision asked 27/12, 2008 at 2:21
1

© 2022 - 2024 — McMap. All rights reserved.