程序运行时,在文本框Text1中输入一个整数,单击“判断”按钮Command1后,在标签Label3中显示判断结果。程序运行界面如下图所示。
Private Sub Command1_Click()
Dim x As Integer, h As Integer, k As Integer
x = Val(Text1.Text)
h = 0
k=1
Do While x > 0
h = h + x Mod 10
k=
x = x \ 10
Loop
IfThen
Label3.Caption = “Yes”
Else
Label3.Caption = “No”
End If
End Sub