Question: Algorithm to convert Arabic integer into Roman numerals Only need to convert from 1 to 399 max. I have if N = 399, V =

Algorithm to convert Arabic integer into Roman numerals

Only need to convert from 1 to 399 max.

I have if N = 399, V = 5, X = 10, L = 50, C= 100

IF N >= 100 then

N/C = Quotient , Remainder

Print 'C' * Quotient

Set N = remainder

IF N>=50 then

N/L = Quotient , Remainder

Print 'L' * Quotient

Set N = remainder

I don't think this is correct since 399 = CCCXCIX. How do I do the above correctly?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!