Results 1 to 3 of 3
Thread: Producing Congruent Numbers
- 07-04-2011, 01:02 PM #1
Member
- Join Date
- Jul 2011
- Posts
- 1
- Rep Power
- 0
- 07-04-2011, 01:48 PM #2
Sorry, I don't see your java programming problem. Can you explain what you are trying to do in java, show the code and explain what the problem you are having with coding in java?
Or is this a problem with the algorithm not working properly?
Can you show the output and explain what didn't work and show the code that was in error?I tried to use 1/2bh to get the congruent number. However, this didn't work
- 07-04-2011, 01:54 PM #3
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,408
- Blog Entries
- 7
- Rep Power
- 17
You are only checking triangles with intergral sides; according to a definition, those sides have to be rational, e.g. 20/3, 3/2, 41/6 while the area must be an integral number. Those Pythagorean triples are the way to go (and multiples (or quotients) thereof).
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
Similar Threads
-
Problem getting numbers from user and finding smallest two numbers
By radhi16 in forum New To JavaReplies: 11Last Post: 01-14-2011, 06:36 PM -
Help - special characters producing 404 errors
By Knedlikova in forum New To JavaReplies: 3Last Post: 11-17-2010, 09:13 AM -
Why is this producing ArrayIndexOutOfBoundsException?
By BentByBogus in forum New To JavaReplies: 5Last Post: 10-08-2010, 09:32 PM -
Problem producing XML
By ashleyh in forum Java ServletReplies: 0Last Post: 04-13-2008, 04:29 PM -
producing DOCs
By javaplus in forum New To JavaReplies: 0Last Post: 11-18-2007, 06:08 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks