Home » VB 6 – Cos Function

VB 6 – Cos Function

The Cos function in VB 6 returns the cosine value of a degree. When you enter a degree value in the program, it gives you a real value, that is, the Cosine value.

The program code is given below along with output.

Program Code: Cos Function

Private Sub Command1_Click()
Dim Cosine As Double

Cosine = Cos(Val(Text1.Text))

MsgBox ("The Cosine value is" & " " & Cosine)

End Sub

Output: Cos Function

Output - Cos Function
Output – Cos 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({});