Convert Integer To Roman Number

Write a bash script to convert a given integer to its corresponding roman number.

For simplicity sake, you may assume:

  • input contains only one integer in each line
  • Every integer is in the range of [1, 4999] inclusive of 1 and 4999.

Example:

Assume that input has the following content:

1
2
3
4
5

Your script should output the following:

I
II
III
IV
V

Note:

NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a doubt? Checkout Sample Codes for more details.
Start solving Convert Integer To Roman Number on Interview Code Editor
Sign Up
to access hints and editorial solutions for Convert Integer To Roman Number

Discussion


Loading...
Click here to start solving coding interview questions