The Roman numeral system is an ancient way of representing numbers. The base symbols are I (1), V (5), X (10), L (50), C (100), D (500) and M (1000).
Questions tagged [roman-numerals]
273 questions
0
votes
1 answer
LaTeX: Extract numbers and letters from command variables and conversion to roman numerals
I'm writing a thesis and have been searching on many occasions trying to find a solution to my programming problem. Basically, I have a series of items that I've distinguished in my research data as "A1", "A2", "A3", … , "A13", "B1", B2", and so on.…

stahmo
- 3
- 1
- 2
0
votes
1 answer
Compare string backwards
I'm doing a roman numeral converter to decimal from 1 to 999, I can add the value to acum, for example XV, I can add 10+5=15 but I can't subtract like IV, 5-1=4, how can I compare if a letter is before with a lower value? I tried to print an array…

Jos Fernando Valenzuela
- 13
- 1
- 5
0
votes
3 answers
How to test exception in Java Junit
I created the following method that I use to validate Roman numbers converter.
In JUnit the test passes but the program doesn't throw any exception.
Where did I wrong?
public void validateState(String number){
…

InExperience
- 103
- 1
- 3
- 12
0
votes
1 answer
Custom pages number (roman numbering) on pdf first pages
I need to set page numbers on a pdf I'm creating, so that the first 3 pages would be i,ii,iii and then the following pages starting from 1,2,3,4,5...and so on..
How can i do it with itextsharp??
Thanks
Sander

Saverio
- 57
- 6
0
votes
1 answer
MIPS (SPIM) : debugging nested sub-routines
I am trying to write a MIPS program that will convert a roman numeral (entered as a string of ascii characters) into its decimal value. There's an I/0 component in that the user is prompted for an input, (limited) validity checks are performed, and…

ymediceacuerdate
- 97
- 9
0
votes
3 answers
How to convert numbers to roman numerals using Clojure?
I'm new to Clojure and have a problem with my code. I'm trying make a number converter. This is my code:
(defn romanos [numero]
(when (and (< numero 40) (>= numero 10)) (print "X") (romanos (- numero 10)))
(when (= numero 9) (print "IX")…

Francisco Silva
- 19
- 1
0
votes
0 answers
Converting arabic numerals to roman numerals in a visual basic console application
I want to convert positive integers to roman integers in a VB console application. I'm a newbie and I like know a simpler way to convert normal numbers to roman. And can you explain how to create a function to this more effectively and easily

LordDraagon
- 521
- 12
- 31
0
votes
2 answers
Conversion from Roman numerals in Dive into Python seems to output an extra character
I am learning Python 2.7 by Dive to Python. Here are the codes of "Converting between Roman Numerals and Arabic numerals":
romanNumeralMap = (('M',1000),
('CM',900),
('D',500),
('CD',400),
('C',100),
…

muzikmoe
- 121
- 1
- 2
- 10
0
votes
0 answers
While loop MIPS
Looking to see if someone could tell me what is wrong with my while loop. I am trying to get the program to read the string entered by the user (Roman Numerals) and then compare to my if statements to in the end sum up the amount and print it out as…

Cfs0004
- 85
- 2
- 14
0
votes
0 answers
How do I make my code convert Roman Numerals to numbers?
public static void main(String[] args) {
Scanner userInput = new Scanner(System.in);
int number = promptUserForNumber(userInput);
String romanNum = convertNumberToNumeral(number);
System.out.println("The number " + number + " is the…

osubucs28
- 17
- 4
0
votes
0 answers
comparing a string in MIPS
Could someone tell me what is wrong with my code so far. I am trying to make a program that takes input from the user (roman numerals) and then converts it to integers. So far this is what I have:
.data
buffer: .space 20
onlyCaps: .asciiz "Please…

Cfs0004
- 85
- 2
- 14
0
votes
3 answers
Roman integers to integeres - Simple
The assignment asks to convert a roman integer into an integer. BUt without the grammar associated with roman integers (i.e IV != 4 IV = 6) I am trying to make my code more efficient...
Here is my original code:
def roman_v2():
s = input("Enter…

Matteo Colombi
- 55
- 11
0
votes
2 answers
Converting Roman Numerals to Integers in Java
My instructor gave me a challenge to have a user input a number or roman numeral and have the program convert it to the other. I have made it able to convert an integer to a roman numeral, but I do not know how to do it the other way around. I have…

Dylan Black
- 262
- 3
- 16
0
votes
1 answer
c++ Roman Additive Form Conversion
I'm working in a program that converts from Roman to Decimal. I have to validate 2 things: One that the characters entered are M or D or C or L or X or V or I, in other words valid for processing.
Number two, I have to make sure that bigger…

Meeeeee
- 89
- 1
- 8
0
votes
1 answer
Trouble implementing a recursive call in C
So I'm I've been working with C for the very first time, and I think I'm having trouble using recursion. For instance, to return a value for a recursive call in C#, I might use return methodRecursiveCall(parameter). In C, I have this statement,…