[VB2008] Help needed with mathematics package. (Code in comments)

Here's all the code I have so far. This is for the entire program but the bit I'm stuck with at the moment is the Quadratic solver:

Module Module1

``````Sub Main()

Do

Dim intInput As Integer

Console.WriteLine("")
Console.WriteLine("")
Console.WriteLine("Select 1 for Quadratic Equation solver")
Console.WriteLine("Select 2 for Monte-Carlo integration")
Console.WriteLine("Select 3 for Prime number determination")
Console.WriteLine("Select 4 to exit the program.")

Select Case intInput
Case 1
Console.WriteLine("")
Dim coefA, coefB, coefC, x1, x2 As Double
'Single type requires 4 bytes for storage compared to Double's 8, so it could be implemented here.
'However, Single is limited to 7 digits, meaning an accuracy of 5 d.p is not achievable with any number over 100.
Console.WriteLine("ax^2+bx+c = 0. Enter coefficients")
Console.WriteLine("A:")
Console.WriteLine("B:")
Console.WriteLine("C:")
x1 = (-coefB + Math.Sqrt(coefB ^ 2 - 4 * coefA * coefC)) / (2 * coefA)
x2 = (-coefB - Math.Sqrt(coefB ^ 2 - 4 * coefA * coefC)) / (2 * coefA)
Console.WriteLine("X is equal to " & x1 & " or " & x2)
Case 2
'code for monte-carlo integration here
Case 3
'code for Prime number determination here
Case 4
Exit Sub
Case Else
Console.WriteLine("Please enter a value between 1 and 4")
End Select
Else
Console.WriteLine("Please enter a value between 1 and 4")
End If
Loop

End Sub
``````

End Module