Question: C++ Q1. Input Format The input begin with an integer non a line, which means that there are n test cases And the first character
C++ Q1. Input Format The input begin with an integer non a line, which means that there are n test cases And the first character of each following row is the command P print the quadratic formula + add two quadratic formulas. d find the discriminant of the quadratic formula and print the roots) of it (including complex root) Each quadratic formula contains three integers Eg. ax +bx+c which a, b, c are three integers. (a + c) Constraints Use class and switch to implement Output Format You must output the result after doing the calculation If the formula is **+2x+1, then you have to print 1x*2+2x+1. Sample Input 7 P870 P 123 p507 +651-84-6 d1-32 d121 d123 Sample Output Bx^2+7x+0 1x^2+2x+3 5x+2+Ox+7 -2x^2+9x-5 There are two roots: 2,1 There is a double root-1 There are two complex roots: -1 + 1.41421, -1 -1.414211
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
