Question: Write a C++ program that does the following: Ask user to input three Real numbers a, b and c. They represent the parameters of a
Write a C++ program that does the following: Ask user to input three Real numbers a, b and c. They represent the parameters of a quadratic equation # + + = 0 Classify to one of the following: - Infinite number of solutions (for example, 0# + 0 + 0 = 0 has infinite number of solutions) - No solution (for example, 0# + 0 + 4 = 0 has no solution) - No real solution (for example, # + 4 = 0 has no real solutions) - One real solution - Two real solutions In cases there are 1 or 2 real solutions, also print the solutions. Notes: 1. If 0 and there are real solutions to the equation, you can get these solutions using the following formula: +,# = # 4 2 The number of solutions depends on whether (b2 -4ac) is positive, zero, or negative. 2. In order to calculate the square root of a number (of type double), you should call the sqrt function, located in the cmath library. Follow the syntax as demonstrated in the code below: #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
