Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Online Market Research Cost Effective Searching Of The Internet And Online Databases

Authors: John F. Lescher

1st Edition

0201489295, 978-0201489293

More Books

Students also viewed these Databases questions