PDA

View Full Version : [Java] Erorr trapping for the quadratic equation


punx
10-05-2005, 05:18 PM
Im looking to do some error trapping for the quadratic equation. How would put this into a while statement? Heres the psudeucode

while (sqrt is negative)
println("The answer is imaginary")

Perhaps a Java tutorial site. Thanks in advance.

punx
10-05-2005, 05:23 PM
Oh god, I'm stupid. It was simple.

while (sqrt < 0)
...