Roman numeral to Arabic (vis versa)

Using only selection statements

Page 1 of 1

2 Replies - 7876 Views - Last Post: 04 October 2010 - 11:49 PM Rate Topic: -----

#1 buxx  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 1
  • Joined: 04-October 10

Roman numeral to Arabic (vis versa)

Posted 04 October 2010 - 11:32 PM

I am a beginner at Java and for class we have to write a roman to Arabic converter and Arabic to roman numeral converter. However, we cannot use arrays, methods, or loops. I guess I just need a high level of how you would start this project using if else statements.

My code is getting the user input and I have all that down. But how would you approach the tests for a roman numeral such as MCMXCV and return 1995. I am just stuck and looking for someone to get me a start so that I understand the logic behind it before coding it.

This post has been edited by buxx: 04 October 2010 - 11:45 PM


Is This A Good Question/Topic? -1
  • +

Replies To: Roman numeral to Arabic (vis versa)

#2 masijade  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 196
  • View blog
  • Posts: 580
  • Joined: 03-April 10

Re: Roman numeral to Arabic (vis versa)

Posted 04 October 2010 - 11:39 PM

http://en.wikipedia..../Roman_numerals
Was This Post Helpful? 0
  • +
  • -

#3 masijade  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 196
  • View blog
  • Posts: 580
  • Joined: 03-April 10

Re: Roman numeral to Arabic (vis versa)

Posted 04 October 2010 - 11:49 PM

Well, I see you down-repped that post. Did you even read the wiki post? If you had you would have seen that it describes an algorithm for working with Roman Numerals. But, hey, no code. Maybe that's what your problem was.

This post has been edited by masijade: 04 October 2010 - 11:49 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1