arabic numbers to roman numerals - Programmers Heaven

#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

#### Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

# arabic numbers to roman numerals

Posts: 2Member
Hi,

I was writing to see if anyone knows how to write a program that translate arabic numbers to roman numerals. Am having trouble starting the program.

Thnxz

• Posts: 245Member
Find out how to convert arabic numbers into decimal (base 10) numbers so you get a number made up of 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 which is equal in value to the arabic number.

Next find out how to convert decimal/base 10 to roman numerals and write the code to do that.

I don't know anything about arabic numbers or roman numerals so i can't really help you further than that.

• Posts: 395Member
: Hi,
:
: I was writing to see if anyone knows how to write a program that translate arabic numbers to roman numerals. Am having trouble starting the program.
:
: Thnxz
:
[blue]
You could start in this manner - divide down the original (Arabic) number by the various Roman amounts:

integer of aNumber/1000 gives you the number of M's
integer of the remainder from above / 500 gives you D's
integer of the remainder from above / 100 gives you C's
integer of the remainder from above / 50 gives you L's
integer of the remainder from above / 10 gives you X's
integer of the remainder from above / 5 gives you V's
integer of the remainder from above gives you I's

Next compare all the counts above to see if you need to convert any to "proper" values such as four I's, which would equal 4 Arabic, is only used for clock faces, so for a written Roman numeral it would be changed to IV. After you have all the conversions in place, string the Roman characters together and display them. To be thorough you should make sure you have a handle on all the "Roman Numeral Rules" such as whether 90 Arabic would be LXXXX or XC.

Take Care,
Ed[/blue]

• Posts: 243Member
: Find out how to convert arabic numbers into decimal (base 10) numbers so you get a number made up of 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 which is equal in value to the arabic number.
:
: Next find out how to convert decimal/base 10 to roman numerals and write the code to do that.
:
: I don't know anything about arabic numbers or roman numerals so i can't really help you further than that.
: