by Dinesh Thakur

This is C program that ask to find out the quadric equation. User need to declare the variables that can contain the value in it. Here user asks to enter the value for each variable declared in the equation. User asks value on run time situation. Core step of this program to define the quadric method for equation execution. As user put on the method the result is on display as output.

Problem Statement:

This is C program that asks user to find out the quadric equation.

  1. Declare the variables.
  2. Using quadric method.
  3. Display result on the screen as output.

Syntax of Quadric method:
" d=((b*b)-(4*a*c))/(2*a); "

Here is C source code to find out the quadric equation. The output of this program shown below. 

void main()
{
float a,b,c,d;
clrscr();
printf("enter the value of a=  ");
scanf("%f",&a);
printf("enter the value of b=  ");
scanf("%f",&b);
printf("enter the value of c=  ");
scanf("%f",&c);
d=((b*b)-(4*a*c))/(2*a);
printf("\nroots of quadratic eq.=  %f",d);
getch();
}
 Calculate the Quadric Equation