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
Thanks.Code:while (sqrt is negative)
println("The answer is imaginary")
Printable View
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
Thanks.Code:while (sqrt is negative)
println("The answer is imaginary")
while (Math.sqrt(<some double value>) < 0) {
System.out.println("The square root is less than 0");
}