Page 1 of 1

Questions 2 Write a C program that computes the roots of a quadratic equation. This program should compute values for th

Posted: Mon May 02, 2022 11:43 am
by answerhappygod
Questions 2 Write A C Program That Computes The Roots Of A Quadratic Equation This Program Should Compute Values For Th 1
Questions 2 Write A C Program That Computes The Roots Of A Quadratic Equation This Program Should Compute Values For Th 1 (538.59 KiB) Viewed 43 times
Questions 2 Write a C program that computes the roots of a quadratic equation. This program should compute values for the THREE cases: i) Real and distinct roots Real and equal roots 111) Complex roots HINT: use conditional expressions to aid in the computation of the three cases above. For the case of complex roots, include the "PÂș character in your display to carter for the <i> in the imaginary part of complex numbers. Split your program into two files: quadrafile.h and assignqn2.c The header file quadrafile.h should contain code for a function definition quadSolve(). This function returns the roots of a quadratic equation given its arguments as a, b, and c, which are the three coefficients. HINT: use the quadratic formula; use the sqrt() and fabs() math.h functions where appropriate. Finally, implement the above code in the assignqn2.c file in order to test your program with the quadratic equations given by their coefficients (a, b, c) respectively as: {1.-4. 4; {1, 6.0) 11.-5.6) 11. 2. 2) {2. 3. 47 USE the scanf() function to enter the required coefficients directly via TERMINAL in vs code. CU 00