Computer Science, asked by KMANISH1867, 10 months ago

Write a program to print roots of a quadratic equation

Answers

Answered by amrutbhoite4
1

Answer:

Program to Find Roots of a Quadratic Equation

#include <math.h>

double a, b, c, discriminant, root1, root2, realPart, imagPart;

printf("Enter coefficients a, b and c: ");

scanf("%lf %lf %lf", &a, &b, &c);

discriminant = b * b - 4 * a * c;

// condition for real and different roots.

if (discriminant > 0)

Similar questions
Math, 10 months ago