| Код | Const Digits$ = "0123456789"
Private Sub Command1_Click() Dim Count As Integer xStr$ = InputBox("Input string") Count = 0 For i = 1 To Len(xStr$) If InStr(Digits$, Mid$(xStr$, i, 1)) > 0 Then Count = Count + 1 Next If Count = 0 Then Print "There are no digits in it." ElseIf Count = 1 Then Print "There is 1 digit in it." Else Print "There are"; Count; " digits in it" End If End Sub |
|