What does "didn't work" mean? If there are errors, copy the full text of the error message and paste it here.
What did the print out show you about how the code is computing values?
Type: Posts; User: Norm
What does "didn't work" mean? If there are errors, copy the full text of the error message and paste it here.
What did the print out show you about how the code is computing values?
For testing use the small values: 55 and 268.
When the code works for those numbers then try the larger number.
Try debugging the code by adding println() statements inside the loops that print...
Can you explain what problems you are having writing the code for the algorithm?
Please put the whole program within one pair of code tags. Not just bits and pieces of it.
Please post the complete new version of the code. Be sure to wrap the code in code tags:
YOUR CODE HERE
to get highlighting and preserve formatting.
Do you have an algorithm for solving that? If you do, post it and explain what problems you are having coding it in java.