Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started