Program in C to find out Quardratic Equation (d=b2-4ac)

Write a program in C to find out Quardratic Equation (d=b2-4ac)

#include <stdio.h>

void main ()
{
          int a,b,c,d;
          clrscr ();
          printf ("Enter A: ");
          scanf ("%d",&a);
          printf ("Enter B: ");
          scanf ("%d",&b);
          printf ("Enter C: ");
          scanf ("%d",&c);
          d= (b*b)-(4*a*c);
          printf ("\nAnswer is %d",d);
          getch ();
}


Post a Comment