Pratices Code For Visual Basic 6.0
Pages
Visual Basic Codes
Friday, 14 June 2013
Count Digit
Count Digit :-
In Out-put Enter the 5 to 10 digit in INPUT-BOX Like that :-
This Code for that:-
Private Sub Command1_Click()
Dim n, a, k As Integer
n = InputBox("enter the number")
While (n > 0)
a = n Mod 10
k = k + 1
n = Int(n / 10)
Wend
Print k
End Sub
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment