Computer Science, asked by anisha1908, 3 months ago

Write a program to calculate discriminant of the following equations:
D = 4b2 - 2ac
For this, enter the values of a, b, c and put them into the equation and print the value of D.

Sample Input:
Enter value of a,b,c:
2 5 7
Pls no silly answers ....

Answers

Answered by umeshnirmal04
2

Answer:

The real roots of a quadratic equation can be calculated using the quadratic formula as:

_______

root 1 = (-b + b2 - 4ac ) / 2a

_______

root 2 = (-b - b2 - 4ac ) / 2a

However, if a user entered a value of zero for a, the division by 2a would result in an error when the program is run. Another error occurs when the value of the term b2 - 4ac, which is called the discriminant, is negative, because the square root of a negative number cannot be taken.

Using the algorithm below, write a C program that solves for the two roots of a quadratic equation.

Answered by tejaswisethy
0

Answer:

D=b square - 4ac ok brother

Similar questions