Step 4. Click on the Save Template button To make this youtube playlist work we need to add the HTML structure of it: Step 5. Go to Layout or Pages or anywhere you want to add it and add the following code inside the HTML area (if you want to add it as a widget, paste the code inside a HTML/Javascript gadget by clicking on Add a gadget link within the Layout/Page Elements section):

Search This Blog

Follow me on Facebook

Quadratic Equation (Roots) calculate the roots of quadratic equation in easy way in C

Quadratic Equation (Roots)
calculate the roots of quadratic equation in easy way in C
#include <stdio.h>
#include <math.h>
int main()
{
       float a, b, c, x1, x2, x, d;
       printf("Enter the values of a, b, c for the equation ax^2+bx+c=0\n");
       scanf("%f%f%f" , &a, &b, &c);
       d=b*b-4*a*c;         //d=discriminant
       if(a==0 && b==0)
       {
              printf("No Solution\n");
       }
       else if(a==0)
       {
              x=(-c)/b;
              printf("%f\n" , x);
       }
       else if(d<0)
       {
              printf("The Roosts are imaginary\n");
       }
       else
       {
              x1=(-b+sqrt(d))/(2*a);
              x2=(-b-sqrt(d))/(2*a);
              printf("The roots are %f & %f\n" , x1, x2);
       }
       return 0;

}
Quadratic Equation (Roots)
calculate the roots of quadratic equation in easy way in C