I need both algoeithm and C++ program. For C++ use #include
using namespace std;
Thank you
Quadratic eqaation is detinod as: in which a, b and e are rcal valas This oquation may havg one or two real rools or no real root at all. Hore is the criteria that is used so detormine the solution to this oquation if.eo There are two different selutions to this equation. These solutions are There is no real solution to this equation However, this oqaation has imaginary solutions that one can find This equation has one solution, which can be found by setting b-tae to 0 in the first case. Thus, we may assume that both roots are the same and oqual to -b 2a. Sa, you may combine (1) and (3)in one. You are to write a program that can sove mny sets of quadratic eqaations. The program will ask wsers whether thry want to solve another oquation. The user decides to continue by entoring 1 or to terminaie by entering 0 or any other number. The program will ask the user to input the s, b and e, and then will display the answer based on the criteria given abone sep 1 Develop your a prithm=l lest it on paper. Rammber that there are several precaut s that you need lo take when you solve this problen. I let you figure them oul, but they are out there and you need touch fr them. Siep 2) Implement the algorithm, wine a C++ program and test it to make sure it produces the correct results. Here are some test cases a-2.b-4e2 Case 3)- Both roots are the same and oqual to b2a, which is-44-- Case (1)-There are two roots1- 033333 and x2- Case (2)- There is no real solution to this equation Note that if a user enters an a that is 0 you will have a solution to the equatios that is given at the to but the equation is no longer a quadratie equation divide by 0(nan-time error) eor whon you run your peogram. So be propared to display the appropriate message whon a user enters a -o le such a case, if you use the solution to quadratic equations, you will have