This must be programmed in VBA and NOT any other programming language. It should
ID: 3529639 • Letter: T
Question
This must be programmed in VBA and NOT any other programming language. It should be able to work in Microsoft Excel. [Alt+F11, right click on VBAProject and then create a module to open the coding screen]
Explanation / Answer
plz give lifesaver stars...:).... for this first save the input values of a,b,c (in a(x^2)+bx+c=0) in the cells(1,1),(1,2)(1,3) respectively ,,, then run the program...:)...best of luck....:) Dim a As Double Dim b As Double Dim c As Double Dim d As Double Dim real As Double Dim imm As Double Dim root1 As Double Dim root2 As Double Sub quad() a = Cells(1, 1) b = Cells(1, 2) c = Cells(1, 3) d = ((b * b) - (4 * a * c)) If ((b * b) < (4 * a * c)) Then real = -b / (2 * a) imm = Sqr(-d) / (2 * a) Cells(1, 4) = "real part" Cells(1, 5) = "imm part" Cells(2, 4) = real Cells(2, 5) = imm End If If ((b * b) > (4 * a * c)) Then root1 = (-b / (2 * a)) + (Sqr(d) / (2 * a)) root2 = (-b / (2 * a)) - (Sqr(d) / (2 * a)) Cells(1, 4) = "root1" Cells(1, 5) = "root2" Cells(2, 4) = root1 Cells(2, 5) = root2 End If If ((b * b) = (4 * a * c)) Then root1 = (-b / (2 * a)) + (Sqr(d) / (2 * a)) Cells(1, 4) = "root1" Cells(2, 4) = root1 End If End SubRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.