1. Member Join Date
Oct 2009
Posts
14
Rep Power
0

## I need a program, help please

If someone can help me, I need a program in Java that will do the following:

find a solution for a numerical riddle. A numerical riddle is made of letters and signs for arithmetic operations (+,- and =), for example B+AB=BA
Different letters are for different digits. Same letters are for same digits. The solution of the riddle is making the letters into digits that will give a correct equation. For example, for the riddle AB+B=BA, the solution could be 89+9=98
The riddles are placed in a file, where every line of the file is one riddle.
The output should be every possible solution for every of the riddles of the file.
If the first digit of the statement is 0, the solution shouldn't be printed. For example, AB+B=C, one solution is 01+1=2, but it shouldn't be in the output.

If someone can help me, write me a private message please, I would prefer if you do not write in the thread.  Reply With Quote

2. ## I'm sorry but that is not how this forum works. It is for sharing questions and solutions with all. As it is all you've done is post your assignment. If you have any specific questions, please post them as most all here would be more than happy to help you out.

Much luck.  Reply With Quote

3. ##  Originally Posted by Srcee If someone can help me, write me a private message please, I would prefer if you do not write in the thread.
But why post here then? imho, if you post here you should read here. It's a nice little puzzle, why withhold others from reading nice little solutions?

kind regards,

Jos  Reply With Quote

4. ##  Originally Posted by JosAH But why post here then? imho, if you post here you should read here. It's a nice little puzzle, why withhold others from reading nice little solutions?
Jos
Much better stated than in my post. Thanks!  Reply With Quote

5. ##  Originally Posted by Fubarable Much better stated than in my post. Thanks!
You're welcome of course; why not make this riddle a little contest? I can generate combinations and permutations (thereof) so the rest of the riddle shouldn't be much of a problem: just let the Javascript engine do the hard work ;-)

kind regards,

Jos  Reply With Quote

6. ## For teasers: my implementation finds the following solutions for ABCDE/FG == HIJ:

Java Code:
```58401/63==927
26910/78==345
17820/36==495
17820/45==396
16038/27==594
16038/54==297
15678/39==402
19084/52==367
32890/46==715```
kind regards,

Jos ;-)  Reply With Quote

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•