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

    Default Producing Congruent Numbers

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

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    On vacation
    Rep Power


    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
    Voorschoten, the Netherlands
    Blog Entries
    Rep Power


    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,

    Build a wall around Donald Trump; I'll pay for it.

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, 09:32 PM
  4. Problem producing XML
    By ashleyh in forum Java Servlet
    Replies: 0
    Last Post: 04-13-2008, 04: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