/*PROGRAM TO FIND THE ROOTS OF A QUADRATIC EQUATION*/
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
float a,b,c,d,alpha,beta;
clrscr();
printf(“enter the value of a, b and c: “);
scanf(“%f%f%f”,&a,&b,&c);
d=(b*b)-(4*a*c);
if(d<0)
{
printf(“Roots are imaginary\n”);
}
else
{
alpha=(-b+sqrt(d))/(2*a);
beta=(-b-sqrt(d))/(2*a);
printf(“Roots of given equation are:\n”);
printf(“\tAlpha=%.2f\n”,alpha);
printf(“\tBeta =%.2f\n”,beta);
}
getch();
}