'*** Convert Decimal Number To Binary (VB6)****
Private Sub Form_Load()
Dim k, t As Integer
k = Val(InputBox("Enter Number"))
t = k
Dim s As String
While (t > 0)
s = (t Mod 2) & s
t = t \ 2
Wend
MsgBox k & " in Binary is " & s
End
End Sub
'Copy And Paste Into VB6 Project
No comments:
Post a Comment