c Program to find roots of quadratic equation using switch using functions
Answers
Answered by
0
Answer:
switch the value of switch (discriminant > 0).the expression (discriminant>0)can have two possible case i.e case 0 and case 1
Explanation:
for case 1 means discriminant is positive.
apply formula root 1=(-b+sqrt(discriminant))/ ( -b + sqrt(discriminant)) /(2*a); to computeroo1 and root2=(-b-sqrt(discriminant))/(2*a);to compute root 2.
Similar questions