【加试题】一个十进制整数的二进制表示中,如果数字“1”的个数多于数字“0”的个数,则称该整数为A类数。如十进制整数26的二进制表示为11010,26是一个A类数。下列VB程序的功能是:统计前1000个自然数中A类数的个数,并在文本框中输出。请在划线处填入合适代码。
Private Sub Command1_Click()
Dim i As Integer, n As Integer
Dim s As Integer, t As Integer, k As
Integer
s = 0
For i = 1 To 1000
n = i
t = 0
k = 0
Do While n > 0
If n Mod 2 = 1 Then t = t + 1 Else
k = k + 1
{#blank#}1{#/blank#}
Loop
If {#blank#}2{#/blank#}Then s = s + 1
Next i
Text1.Text = Str(s)
End Sub