Problem with this is that ints in java are signed. max= 2147483647 (2^31 -1)
Type: Posts; User: Norm
Problem with this is that ints in java are signed. max= 2147483647 (2^31 -1)
Can you describe what happens?
As a suggestion for debugging your algorithm, use a smaller number such as 5 to validate the code works, then change to the larger number. Less debug output and...
Thanks for the reply. Its been a long time since college and set theory.
Better re-read definition of the for loop conditioni part. The loop continues if the condition is true.
Your huge && condition tests true when? and false when?
Another comment on the code: Its hardcoded to solve the problem for 20.
Try to write the code so it will solve the problem for any number x.
@hellowordl922
Could you explain how you get these...
Can you explain the algorithm(s) that you want to use?
Can you explain a bit more? Or show the output and explain why its wrong.