Given that a method receives three parameters a, b, c, of type double , write some code, to be included as part of the method , that determines whether the value of “b squared” – 4ac is negative. If negative, the code prints out the message “no real solutions” and returns from the method

LANGUAGE: JAVA

CHALLENGE:

Given that a method receives three parameters a, b, c, of type double , write some code, to be included as part of the method , that determines whether the value of “b squared” – 4ac is negative. If negative, the code prints out the message “no real solutions” and returns from the method

SOLUTION:

The Bad News: The content you are trying to access is only available to members.

The Good News: You too can be a member, simply Click Here.

Already a member?

Posted in ,

1 Comment

  1. j p on July 20, 2017 at 12:52 am

    Use this:

    if (b*b < 4*a*c)
    {
    System.out.println("no real solutions");
    }

Leave a Comment

You must be logged in to post a comment.