Answer to Question #292195 in Visual Basic for Lam

Question #292195

Convert the following mathematical expression to visual basic formula



(1) -b ± √b²-4ac÷2a



(2) pr²÷√q²+s²

1
Expert's answer
2022-01-30T14:18:55-0500
1
Dim a As Double
        Dim b As Double
        Dim c As Double
        Dim root1 As Double = ((-1) * b + Math.Sqrt(b * b - 4 * a * c)) / (2 * a)
        Dim root2 As Double = ((-1) * b - Math.Sqrt(b * b - 4 * a * c)) / (2 * a)
2
Dim p As Double
        Dim r As Double
        Dim q As Double
        Dim s As Double
        Dim result As Double = p * r * r / (Math.Sqrt(q * q) + s * s)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS