0

Possible Duplicate:
How do you find a roman numeral equivalent of an integer

I need to write a JSP function that will efficiently convert an integer (from 1 - 3000) to a roman numeral.

Community
  • 1
  • 1
jbyrd
  • 5,287
  • 7
  • 52
  • 86
  • 6
    Please note that writing Java code incorrectly inside JSP files instead of Java classes and having problems with it doesn't make it a JSP problem. It's after all the same Java code as you would write in a normal Java class. I removed the JSP tag. – BalusC Sep 15 '11 at 20:21
  • If this is homework then you should add the Homework tag. – rossum Sep 15 '11 at 20:28

2 Answers2

3

Start simple. Work out how you would convert the numbers 1 - 9 into Roman. Code and test. When it is working correctly, extend it to handle numbers up to 99. Again code and test. When it is working correctly, extend it to handle numbers up to 999. Code, test and extend up to 3,000.

rossum
  • 15,344
  • 1
  • 24
  • 38