- 1). Import the .NET framework math class by including the following at the top of your source code: Imports System.Math.
- 2). Declare a variable for storing the number that you want to find the square root of, using the following statement: Dim InputValue As Double.
- 3). Set the value of InputValue equal to the value you want to find the square root of. For example, if you want to find the square root of "25," type the following: InputValue = 25.
- 4). Calculate the square root by calling the appropriate .NET Framework method as follows: Math.Sqrt(InputValue).
previous post