VB 6 – Sqr() Function

In VB 6, the sqr() function gives the square root of any number. The argument for the sqr() function must be a Double mean a real number.

Advertisements
Advertisements

In the example program below, we accept a number and return its square root.

Program Code: Sqr() Function

Private Sub Command1_Click()
Dim result As Double
result = Sqr(Val(Text1.Text))
MsgBox (result)
End Sub

Output: Sqr() Function

Output - Sqr() Function
Figure 1 – Output – Sqr() Function

Advertisements

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.