Write a program to find the solutions of the given quadratic equation.

Source Code

int main (int argc, char *argv[])
  float a,b,c,r1,r2,t;
  printf("\n Enter the co ordinates of the quadratic equation:");
  printf("\n Enter the value preceding x2: ");
  printf("\n Enter the value preceding x: ");
  printf("\n Enter the numeric value: ");
  printf("\n The roots of the quadratic equation %fx2+%fx+%f are:",a,b,c);
    printf("\n only one root : %f",r1);
  else if(t<0)
    printf(" imaginary.");
    printf(" %f and %f",r1,r2);

Find More from our code collection
Armstrong number, binary number to a decimal number, bubble sort, decimal number to binary number, factorial of the given number factors, fibonacci numbers, HCF and LCM, matrix, mergesort, salary of the employee. palindrome, quadratic equation, star patterns, series etc. and much more...
#Return to Example Source Code