Converting Integer To Roman

I have written the following Code which will convert an integer number to a roman..I have a array list of integer number which I pass through a for loop and the return value is individual converted Roman character..
My Issue is when the converted value is returned from the function I want to capture it in another character array one after the other but am failed to do it..
plzzzz Help

I have written the following Code which will convert an integer number to a roman..I have a array list of integer number which I pass through a for loop and the return value is individual converted Roman character..
My Issue is when the converted value is returned from the function I want to capture it in another character array one after the other but am failed to do it..
plzzzz Help

If you're going to return a value you have to avtually return the value. All you did is load a local array with the Roman numerals and exit the function.

Pass the Roman array into the function and load it.

And do not post as a Code Snippet. Requests for help are not snippets.

i think putting a big struct of strings like "CD" and "CM" and values such as 400 and 900 (and so forth) is sloppy way to go about it and overly complicates the thing.

the algorithm behind roman numerals is simple: if the smaller value precedes the larger, then the smaller value is deducted from the larger, rather than added. (Note also that only the even powers of 10 (ie, 1, 10, 100) are ever deducted from a larger value.)

This will work correctly for numbers that don't require smaller values preceding larger, such as num = 2037. But it won't work correctly for numbers such as 1998. And so this only solves part of the problem.

Now the question becomes: how do you determine when a smaller value needs to be deducted from the larger, and so requiring a smaller character to precede the larger?

the solution, to be entered in the code where notated, is not much more complicated than what's already given.