Results 1 to 3 of 3
  1. #1
    freddy92 is offline Member
    Join Date
    Jul 2011
    Posts
    1
    Rep Power
    0

    Default Producing Congruent Numbers

    Edit: nevermind, found help elsewhere. Thanks anyway.
    Last edited by freddy92; 07-05-2011 at 01:07 AM. Reason: No longer need help.

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,888
    Rep Power
    25

    Default

    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?

    I tried to use 1/2bh to get the congruent number. However, this didn't work
    Can you show the output and explain what didn't work and show the code that was in error?

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,773
    Blog Entries
    7
    Rep Power
    21

    Default

    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,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Replies: 11
    Last Post: 01-14-2011, 07:36 PM
  2. Help - special characters producing 404 errors
    By Knedlikova in forum New To Java
    Replies: 3
    Last Post: 11-17-2010, 10:13 AM
  3. Why is this producing ArrayIndexOutOfBoundsException?
    By BentByBogus in forum New To Java
    Replies: 5
    Last Post: 10-08-2010, 10:32 PM
  4. Problem producing XML
    By ashleyh in forum Java Servlet
    Replies: 0
    Last Post: 04-13-2008, 05:29 PM
  5. producing DOCs
    By javaplus in forum New To Java
    Replies: 0
    Last Post: 11-18-2007, 07:08 PM

Posting Permissions

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