Home » VB 6 – Sqr() Function

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.

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
Output – Sqr() Function
(adsbygoogle = window.adsbygoogle || []).push({}); </script

Please support us by disabling your adblocker or whitelist this site from your adblocker. Thanks!

turn of adblocker imag

(adsbygoogle = window.adsbygoogle || []).push({});