Tuesday, February 16, 2021

 #include <stdio.h>

#include<math.h>

int main()
{
    float abcDx1x2;
    printf("Enter the coefficiants :\n");
    scanf("%f %f %f", &a, &b, &c);
    D = (b * b) - (4 * a * c);
    
    x1 = (-b + sqrt(D)) / 2 * a;
    x2 = (-b - sqrt(D)) / 2 * a;
    printf("The roots of the quadratic equation are :\t%.3f\t%.3f"x1x2);
    return 0;
}  

No comments:

HackCache ’26: A 48-Hour Online Hackathon Open to Every Student

  Hackathons are often associated with computer science students, experienced developers, and teams that already know exactly what they are...

Popular Posts