Skip to content
← Back to Community
Roman Numeral Calculator
Profile icon
John_Nicole

https://repl.it/@John_Nicole/Intermediate-Algorithm-Scripting-Roman-Numeral-Converter

Not the best code, certainly things i would change. It does work up to a million, and was done for a project.Input is on line 106

Voters
Profile icon
John_Nicole
Comments
hotnewtop
Profile icon
HappyFakeboulde

Good job, but I would suggest adding a user input system.

Profile icon
John_Nicole

@happyfakeboulde: I have no idea how to do that, this was for a freeCodeCamp intermediate algorithm scripting challenge.

Profile icon
maxxtandon

Doesn't work for zero

Profile icon
John_Nicole

@maxxtandon: Ill fix it, but a quick google search came up with 0 as 'nulla'

Profile icon
maxxtandon

@johnnicole: Use the instanceof command to see if it isn't an integer to return an error (you can just throw one). Also, make an input instead of having the user manually have to call the method

Profile icon
John_Nicole

@maxxtandon: Yeah but i can simply just put a if statement and just put 0 and nulla. Everyone here can program, so scrolling down to line 106 is a pretty simple task.