Private Sub Command1_Click() Dim a As String, n As Integer Dim s As Integer,
PrivateSubCommand1_Click()DimaAsString,nAsIntegerDimsAsInteger,iAsIntegera=Text1.Text...
Private Sub Command1_Click()
Dim a As String, n As Integer
Dim s As
Integer, i As Integer
a = Text1.Text
n = Len(a)
s = 0
For i
= 1 To n
s = s + Val(Mid(a, i, 1))
Next i
Label1.Caption =
Str(s)
End
Sub
运行该程序,在文本框Text1中输入2012,单击命令按钮Command1,在标签Label1中显示的是__________。
急啊 展开
Dim a As String, n As Integer
Dim s As
Integer, i As Integer
a = Text1.Text
n = Len(a)
s = 0
For i
= 1 To n
s = s + Val(Mid(a, i, 1))
Next i
Label1.Caption =
Str(s)
End
Sub
运行该程序,在文本框Text1中输入2012,单击命令按钮Command1,在标签Label1中显示的是__________。
急啊 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询