问题 填空题

执行下面程序,单击命令按钮Cmd1后,窗体上显示的第一行内容是(),第二行内容是(),第三行内容是()。

Option Explicit

Private Sub Cmd1_Click()

Dim st As String,ch As String*1,t As Integer

Dim i As Integer

st="2,3,8,12,32,65#"

For i=1 To Len(st)

ch=Mid(st,i,1)

If ch<>"," And ch<>"#" Then

t=t*10+Val(ch)

Else

If pd(t) Then Print t

t=0

End If

Next i

End Sub

Private Function pd(ByVal n As Integer)As Boolean

Do While n<>1

If n Mod 2<>0 Then

Exit Function

EndIf

n=n\2

Loop

pd=True

End Function

答案

参考答案:2;8;32

单项选择题 A1/A2型题
单项选择题 A2型题