# Questions tagged [roman-numerals]

The Roman numeral system is an ancient way of representing numbers. The symbols are I, V, X, L, C, D and M.

61 questions
Filter by
Sorted by
Tagged with
26 views

### Roman numerals isomorphic conversion in Go

I always try to port the roman numeral conversion algorithm to learn new languages. Reading the Go manual as a beginner, this is the most idiomatic way I've been able to write it. I would love it if ...
2k views

### Converting Roman numerals to integers

Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. ...
26 views

### Instant to-and-from Roman Numeral Conversion

Ⅰ Roman numerals are composed of digits taken from a small set of uppercase characters. Lowercase characters were first used in the Middle Ages. $$I,V,X,L,C,D,M$$ With these digits we can ...
91 views

### Roman Number to Integer

Problem Definition Roman numerals are represented by seven different symbols: I, V, X, <...
148 views

### Roman Numbers - The Functional Way

Yet another exercise in converting values between the decimal and roman number systems. I have tried the functional way. Any comments are welcome - but I'm especially interested in answers focusing ...
150 views

### Leetcode: Roman digit to integer

I tried to solve the question at https://leetcode.com/problems/roman-to-integer/ i.e Converting an Roman Digit to a Integer using C#. It passes all the test cases but any suggestions to reduce run ...
545 views

### Decimal to roman python

I'm a beginner as you can see and I would like to know how I can improve my code. Studying for 6 months now. Thank you. ...
111 views

### Number of possible numbers in roman number string

I just started learning programming a few months ago, and I'm intrigued by Haskell. To learn a bit I tried to adapt some code I have in Java so I can see what are equivalent solutions in Haskell. The ...
127 views

### Integer to Roman Numerals (1 - 2999)

This is a homework assignment. Convert an integer (1 - 2999) to roman numerals. I was wondering if I could make my code more efficient. The way I have it set up is that I take the digits of the input (...
666 views

### Java converter from Arabic to Roman Numerals

I am learning Java and would like to get feedback on the code I wrote. I have written an implementation of an algorithm (found here) for converting any decimal Arabic number to Roman numeral string. ...
661 views

### int to Roman numerals in Go / Golang

For a new project, I've started learning Golang. This is one of my very first steps in Go. The objective that I've given myself is to convert int to a String representing the roman numeral of that ...
463 views

### Roman_int class in C++

I did the following Excercise from Stroustrups PPP-Book (CH10 EX6) Define a Roman_int class for holding Roman numerals (as int...
3k views

### Roman to Integer

I'm trying to get better as a programmer and would love any feedback on my code. Especially the section in the while loop. How could I make this more readable? What would your opinion as an ...
927 views

### Roman to Arabic numerals converter in Javascript

I was given some homework as a technical test by a company I wanted to work for... Which I failed to the point of not being able to even access the code review portion of the interviewing process. ...
291 views

### Converting from decimals to roman numerals

I've submitted the following code for a job interview, and I wanna know if there is anything I can improve on it, or better ways to do the same thing. ...
140 views

### Converting to and from Roman numerals

I wrote a simple Boot script for converting to and from Roman numerals using instaparse. Here's my EBNF grammar (roman.bnf): ...
693 views

### Roman numerals to Arabic number

Is there any way to make this for loop more concise or efficient? I fell like there should be a way that you can cahnge the for loop so that it is about half the size that it is know. By the way, the ...
2k views

### Number to Roman Numerals in Python

I recently started learning python. Requirements Input: Integer between 1 and 3999 Output: String with Roman numerals I would appreciate it if someone could have look at the code and give me any ...
355 views

### Converting an integer to Greek and Roman numerals

Yesterday I posted a question about converting an integer to it's Roman Numeral equivalent. Apparently you guys liked it and gave me some good advice, so I decided to take all your advice, and go a ...
8k views

### Convert an integer to its Roman numeral equivalent

I got sent a challenge from a friend; You are given a file that contains numbers, one number per line. Convert the numbers from the file into roman numerals. ...
1k views

### Conversion from Roman to decimal numbers

My program makes a conversion between Roman and decimal numbers. Can you give me some advice on how to make it look more readable or to improve in general? Would code extraction of similar-looking ...
6k views

### “Merchants Guide to Galaxy” challenge

I have solved the classic "Merchants Guide to Galaxy" problem: A merchant buys and sells items in the galaxy. Buying and selling over the galaxy requires you to convert numbers and units. The ...
5k views

### Converting from Roman numerals to Arabic numbers

I got an idea to make a Roman/Arabic number converter, and I would like to hear your thoughts, where I could improve it, if there are Python specific things that I missed, so on and so forth. ...
75 views

### Use SRP to refactor this Ruby Class

I have a class, and it does one thing, It adds numerals to the numerals array. In doing so it uses a number of private methods and has ended up looking a little bit sickening... brace yourself... <...
2k views

### Convert Integer to Roman Numeral

I've created a function that takes an integer greater than zero as an input and converts it into its corresponding Roman numeral. If you're not familiar with Roman numerals, you can read about it on ...
1k views

### Arabic numbers to Roman numerals and back

I have decided to give python a try and have to start out at the very basics, so I chose this well-represented kata. The code aims to convert Arabic numbers between 1 and 3999 to Roman numerals and ...
665 views

### A roman to integer converter

For an interview question I made a roman to integer converter: ...
418 views

### Roman number converter in Kotlin

I'm learning kotlin and java. As a code-kata I wrote the roman to decimal converter. I'd be very grateful for code review. I was trying to keep things simple and funcional. I'd especially appreciate ...
288 views

### Arabic to Roman Number in Ruby on Rails

I am making a class method in ruby to convert from roman number to Arabic and vice versa. However the loop is run to match each character and again to match with roman mapper. Can I optimize the same? ...
628 views

### Integer to roman number converter

This is (yet another) integer to Roman numeral converter. To give it a slightly interesting twist, I've implemented this as a num_put facet of a C++ locale, so by ...
588 views

### Convert to Roman numerals in Ruby

Challenged by Sandy Metz's newsletter, I've tried to implement this kata from exercism. However, my solution, which passes the tests, is quite a lot simpler than Sandy's solution. Ok, so she's using ...
431 views

### Let's revisit Roman numbers

Problem Statement: Write a function to convert from normal numbers to Roman Numerals: e.g. 1 => I 10 => X 7 => VII Code: ...
370 views

### Convert Roman Numeral to Arabic

I've been learning Haskell recently and I decided I needed to work on a (somewhat) realistic problem. What I'm most interested in getting feedback on is how well I've used the tools in Haskell to ...
534 views

### Arabic numbers to Roman numerals conversion

The following converts Arabic numbers to Roman numerals. I decided to factor each digit into its place value, then use a mapping to convert it to its Roman equivalent. For example, 1997 is factored ...
3k views

### Roman numeral converter project

I have a project that is due for my Intro to Java course which requires me to translate the number range of 1 - 3999 into Roman numeral form. If the number I pick is 0 it will end my program, anything ...
781 views

### Converting decimal to Roman numerals using MATLAB

I have written a MATLAB function that converts decimals into Roman numerals. ...
275 views

I have written a module that provides some functions for dealing with Roman numerals. I would like some feedback concerning my style, potential performance or elegance improvements, and any ...
391 views

### Roman numerals with ANTLR

I've written a simple interpreter with ANTLR for evaluating Roman numerals. Here's the contents of the grammar file (Roman.g4): ...
2k views

### Number to Roman numerals

I've been working on numerals conversion lately. Now the JavaScript course I'm following asked me to do something similar for Roman numerals. To keep things fresh and given the amount of test-cases ...
5k views

### Roman Numerals in Java

I wrote a class that can convert to and fro from Roman Numerals and Decimals. I would appreciate critical points on everything, especially: Shortening my code. Choosing a better approach. Using ...
1k views

### Decimal to Roman numeral conversion algorithm

I have written a program to convert a decimal to a Roman numeral. I am wondering if my algorithm is okay or not. If it's not okay, I want suggestions on improving my code. This code only works for ...
989 views

### Integer to Roman Numeral converter

I have implemented an Integer to Roman Numeral converter that converts any number in the range $[1 \le x \le4999]$ to its Roman number equivalent. Any comments on improving my code style or ...
5k views

### Checking for Roman numeral validity

I am working on a Roman numerals calculator. For an input validity test I'm using this function: ...
103 views

### Number to Roman in Javascript

Is this a good solution for the Number to Roman Numerals Kata in Javascript? ...
5k views

### Roman Numerals - the good, the bad, and the ugly

I wrote a RomanNumeral class in C#. Please pull it to pieces: ...
2k views

This is the first coding class I've taken and I'm not getting much feedback from the instructor. The function of this program is to take two roman numeral inputs, convert them to arabic, add them ...
410 views

### Roman numeral to decimal converter

Program written in TI-Basic that works on TI-83/84/+/SE calculators. Automatically detects whether input is a number of a Roman numeral, and converts to the opposite. Please try to optimize for size, ...
2k views

### Converting to Roman Numeral with Recursive Algorithm

Summary I'm getting ready to dive back into a "more proper" project, so I wanted to take a moment to get my TDD hat on before doing so. I decided to tackle this Roman Numeral Kata for practice. The ...