switch case statement

can I use a condition in a case such as......
switch (sqroo)
case x<0;
case x=0;
case x>0;
default

in such a manner.............Write your question here.

need this to calculate the roots of quadratic equation..

then is there any way to find roots usin switch case ,because i have got a problem to do so
Last edited on
No, you have to use an if/else if chain for this.
Topic archived. No new replies allowed.