Question: 5.2 Develop a Sub procedure to determine the real roots of the quadratic equation ax + bx + c = 0. Recall that the

5.2 Develop a Sub procedure to determine the real roots of the quadratic equation ax + bx + c = 0. Recall that the real roots can be determined with the quadratic formula -b b2-4ac 2a (5.5) (5.6) In VBA, this formula would be implemented as x1 = (-b + Sqr(b ^ 2 - 4 * a * c)) / (2 * a) (-bSqr(b 2 - 4 * a * c)) / (2 * a) x2 = Test your program for the following cases: a = -1, b = 8, c = 2; and a = 1, b = 4, c = 1. In addition, try a case that yields an imaginary root: a = 7, b = 3, c1. What happens?
Step by Step Solution
3.41 Rating (148 Votes )
There are 3 Steps involved in it
Here is a VBA Sub procedure that calculates the real roots of a quadratic equation based on the give... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (2 attachments)
663df56326acc_960772.pdf
180 KBs PDF File
663df56326acc_960772.docx
120 KBs Word File
