Roman numeral conversion help

Roman numeral conversion help
0

#1

Im trying to covert numbers to roman numerals, yet i cant use any number above 4999 because 5000 is V with a line over top --> http://www.rapidtables.com/convert/number/roman-numerals-converter.htm

It can’t copy and paste that line, so how can i? I only get V when i try too. This is annoying since i cant do any number over 4999, or it gets confused with 5. which makes this conversion kinda useless. I don’t want to repeat 1000, 5 times because that is just just repetitive and annoying.

Any help?


#2

That’s why the highest number that the challenge tests is 3999. :slight_smile:


#3

Yeah, but i wanted to do any number between 1 and one million. Its simply possible if i could only get that line ;-;


#4

Looking at the page you linked, I see that they were just decorating letters.
image
I’m guessing that this means there is no character code for those funky roman numbers.


#5

You can use the overline character: ̅ Whatever character you put in front of it will get the overline:
V̅ => V̅


#6

slow clap


#7

@ArielLeslie lol i tried that too

@BenGitter

Can you make a list of every roman number on the top so i can copy and paste it?

Thanks :smiley:


#8

Nope.

You can put any letter in front of ̅ and it will show that letter with an overline:
X̅ => X̅


#9

T̅he o̅verbar c̅ha̅ra̅ct̅er̅ cod̅e i̅s̅ the̅ o̅nly on̅e y̅ou̅ ne̅e̅d.


#10

I had to use codepen to execute this, any other way? (for further reference)


#11

This will only work when displaying HTML. If you are trying to do this via the console, it will not work.


#12

Oh okay, ill remember that for later :slight_smile:


#13

Hey guys i am discovering a issue with using this. I am using repl. The roman numerals with a line over top, like M̅, glitch when you try to use them You have to type everything one space off * how many there are… For example, when i’m using a array, to place the M̅ into the quotes i need to place the M̅ after the quotes, and it moves one space over into the quotes. Its really messed up and makes it impossible to use. You cant even make arrays because of this.

I posted a unlisted video of this happening for reference --> https://www.youtube.com/watch?v=uCfg6nQ-nNc&feature=youtu.be

and the repl --> https://repl.it/@John_Nicole/StupidAdoredCougar


#14

You can’t use the symbol directly, you have to use the character code.


#15

I am using repl and its for the roman conversion challenge. So would it still work? I’m not using html.


#16

If you paste a link to your repl here, we can actually see it run right here in the topic.
Keep in mind though, that repl only displays a console emulator. If you want to try something that renders HTML, you might try something like JSBin instead of repl.


#17

I made a sample https://repl.it/@John_Nicole/StupidAdoredCougar <— here on how it messes up. Try making a array of strings.


#18

You weren’t using the character codes.


#19

Yeah, i copied and pasted the codes in a html and copy and pasted the result. It’s not popping up as M with line, just codes in your code.


#20

Remember: console vs HTML.

JSBin example