Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please do in C not C++ Write a program that prompts the user to enter the coefficients a,b and c from the quadratic equation ax^2+bx+c-0,
Please do in C not C++
Write a program that prompts the user to enter the coefficients a,b and c from the quadratic equation ax^2+bx+c-0, and calculate the roots of the equation. Depending on the value of b^2-4ac (known by the discriminant), your program displays the rootfs) of the given quadratic equation. Here are some sample runs: Sample Run 1:(The user's entry is in bold Enter your the coefficients a b and c separated by space: 11 1 Your quadratic equation has two complex roots:-0.5 +i0.87 and-0.5-i0.87 Goodbye! Sample Run 2: (The user's entry is in bold) Enter your the coefficients a b and c separated by space: 1 Your quadratic equation has one real repeated root: -1 Goodbye! 2 1 Sample Run 3: (The user's entry is in bold) Enter your the coefficients a b and c separated by space: 0 Sorry the first coefficient can't be 0! Goodbye! 2 1Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started