Private Sub Command1_Click() Dim i As Integer,s As Integer,n As IntegerPrivate Sub Command1_Click()Dim i As Integer,s As Integer,n As Integern = Val(Text1.Text)s = oFor i = 1 To ns = s + i \ 4Next iLabel1.Caption = Str(s)End SubText1中输入8单击c
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/25 02:32:07
Private Sub Command1_Click() Dim i As Integer,s As Integer,n As IntegerPrivate Sub Command1_Click()Dim i As Integer,s As Integer,n As Integern = Val(Text1.Text)s = oFor i = 1 To ns = s + i \ 4Next iLabel1.Caption = Str(s)End SubText1中输入8单击c
Private Sub Command1_Click() Dim i As Integer,s As Integer,n As Integer
Private Sub Command1_Click()
Dim i As Integer,s As Integer,n As Integer
n = Val(Text1.Text)
s = o
For i = 1 To n
s = s + i \ 4
Next i
Label1.Caption = Str(s)
End Sub
Text1中输入8单击command1 label上显示什么?
Private Sub Command1_Click() Dim i As Integer,s As Integer,n As IntegerPrivate Sub Command1_Click()Dim i As Integer,s As Integer,n As Integern = Val(Text1.Text)s = oFor i = 1 To ns = s + i \ 4Next iLabel1.Caption = Str(s)End SubText1中输入8单击c
i=1 s=s+i\4=0+1\4=0+0=0
i=2 s=s+i\4=0+2\4=0+0=0
i=3 s=s+i\4=0+3\4=0+0=0
i=4 s=s+i\4=0+4\4=0+1=1
i=5 s=s+i\4=1+5\4=1+1=2
i=6 s=s+i\4=2+6\4=2+1=3
i=7 s=s+i\4=3+7\4=3+1=4
i=8 s=s+i\4=4+8\4=4+2=6
所以Label1上显示的是 6