实现上述功能的VB程序如下,请在划线处填入合适的代码。
Private Sub Command1_Click()
Dim i As Long, n As Long, t As Long
Dim s As Long ′s用于统计1到n之间包含数字2的整数个数
Dim k As Boolean
s = 0
n = Val(Textin.Text)
For i = 1 To n
k = False
t = i
Do While Not k And t > 0
t = t \ 10
Loop
If k Then
Next i
Textout.Text = Str(s)
End Sub