Search:

Type: Posts; User: helloworld922

Search: Search took 0.11 seconds.

  1. Replies
    14
    Views
    6,666

    Re: help!! quadratic program

    You tried to take the square root of a negative number. NaN stands for "not a number", which technically isn't true. It's just not a real number, but there are imaginary roots.
  2. Replies
    14
    Views
    6,666

    Re: help!! quadratic program

    :O


    public class Ø
    {
    public Ø()
    {
    System.out.println("No!");
    }
    }
  3. Replies
    14
    Views
    6,666

    Re: help!! quadratic program

    I think you might run into a problem by naming a variable quadratic and the class quadratic... not positive on this. As a general rule, always name classes starting with upper case letters, and...
  4. Replies
    14
    Views
    6,666

    Re: help!! quadratic program

    ... they are the coefficients to the quadratic equation. In other words, you (or the user) gets to choose them. I don't see much use in this program, it can only solve one quadratic equation :P
    ...
  5. Replies
    14
    Views
    6,666

    Re: help!! quadratic program

    You're java syntax is a bit off :P Also, it's not possible for a method to return 2 values, so I removed the helper method. Don't know if you have to handle imaginary roots, I left that out. I would...
  6. Replies
    14
    Views
    6,666

    Re: help!! quadratic program

    What have you done so far?
Results 1 to 6 of 6