-3

I've been trying to find a working algorithm for converting numbers into Hebrew words (e.g. 10,250 = עשרת אלפים, מאתיים חמישים),
but no luck so far.
The conversion of numbers to words in Hebrew is very much different than in English.
Can you provide me one? Thanks!

avi12
  • 37
  • 1
  • 7
  • [An open letter to students with homework problems](http://meta.programmers.stackexchange.com/questions/6166/open-letter-to-students-with-homework-problems) – Joe C Nov 29 '16 at 23:08
  • Two things: 1. It's not my homework, but a fun-work. 2. I've seen in many cases that users are provided with the full code. How's that different from my situation? – avi12 Nov 29 '16 at 23:11
  • 1
    I'm not entirely sure what's fun about copy-pasting someone else's code, but heck, to each his own. – Joe C Nov 29 '16 at 23:16
  • 1
    Possible duplicate of [How to convert number to words in java](http://stackoverflow.com/questions/3911966/how-to-convert-number-to-words-in-java) – shmosel Nov 29 '16 at 23:20
  • @shmosel There's a difference between English and Hebrew in number conversion, so I cannot use the same algorithm for both. Modifications must be applied. – avi12 Nov 29 '16 at 23:23
  • Of course there is. Do you really want us to do all your work for you? – shmosel Nov 29 '16 at 23:23

1 Answers1

0

Here is a good reference implemented for English words.

The main concept you should think of is building your Hebrew word based on the number length. You should think of converting the number to String and check the String length. Than you can build the word base on iterating over each digit in the number.

Rotem
  • 1,277
  • 1
  • 11
  • 23