• Post Reply Bookmark Topic Watch Topic
  • New Topic

RomanNumeral java w/o arrays  RSS feed

 
Larry Sanders
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you write a java code to convert RomanNumerals without using arrays?
[ February 24, 2004: Message edited by: Larry Sanders ]
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Larry / Lost One,
Note that the naming policy prohibits obviously fictitious names. The names of well-known fictitious characters definitely fall into this category. Please try again!
Also, please don't post questions to more than one forum -- duplicates just waster people's time. I've deleted the other copy of this message.
Now, finally, on to your question: The way we like to work around here is you give it a try, and we give you advice on improving it or getting closer to making it work. So what have you got so far?
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you talk about MMIV as 2004?
So MMIV has to be a Stringbuffer, a String, or - a 'char' or 'byte'-Array.
Shall MMIV be legal, or MMIIII, or both?
You may iter, convert the single sign, and add it to the result.
If you store the last value for a sign, and get a bigger value, you add the bigger value and substract the last one twice:

[ February 24, 2004: Message edited by: Stefan Wagner ]
[ February 24, 2004: Message edited by: Stefan Wagner ]
[ February 24, 2004: Message edited by: Stefan Wagner ]
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You start with
public static void main(String[] args)
for one thing. What exactly have you tried? What problems have you encountered? Generally, people here won't do your work for you, but we are more than happy to answer any specific questions you have.
Layne
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!