For this problem use the following variable declaration and

For this problem, use the following variable declaration and write two C++ assignment statements that store into variables R1 and R2 the double roots of the quadratic equation, A*X*X + B*X + C = 0. You may assume that the condition B*B - 4*A*C

Solution

//You need to inclue cmath library as \'#include <cmath>\' for the function sqrt to work.

R1 = (-B + sqrt(B*B-4*A*c))/2*A;
R2 = (-B - sqrt(B*B-4*A*c))/2*A;

 For this problem, use the following variable declaration and write two C++ assignment statements that store into variables R1 and R2 the double roots of the qu

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site