Results 1 to 2 of 2
  1. #1
    paul is offline Member
    Join Date
    Jul 2007
    Posts
    26
    Rep Power
    0

    Default Help with quadratic equation in java

    Hi, I'm looking to do some error trapping for the quadratic equation.
    How would put this into a while statement?
    Here's the psudeocode
    Java Code:
    while (sqrt is negative)
          println("The answer is imaginary")
    Thanks.

  2. #2
    Seemster is offline Member
    Join Date
    Jul 2007
    Posts
    55
    Rep Power
    0

    Default

    while (Math.sqrt(<some double value>) < 0) {
    System.out.println("The square root is less than 0");
    }

Similar Threads

  1. Help with an equation in java
    By coco in forum New To Java
    Replies: 1
    Last Post: 07-31-2007, 08:47 AM
  2. Problem with equation in my algorithm
    By romina in forum New To Java
    Replies: 2
    Last Post: 07-20-2007, 08:53 AM

Posting Permissions

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