一道VB题,求解答.执行下面的程序段后,s的值为______,并简述计算过程:执行下面的程序段后,s的值为______,并简述计算过程: Private Sub Form Click() Static s As Integer S =5For i = 1.4 To 2.1 Step 0.6s = s + 1Next
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/25 07:36:15
一道VB题,求解答.执行下面的程序段后,s的值为______,并简述计算过程:执行下面的程序段后,s的值为______,并简述计算过程:PrivateSubFormClick()StaticsAsIn
一道VB题,求解答.执行下面的程序段后,s的值为______,并简述计算过程:执行下面的程序段后,s的值为______,并简述计算过程: Private Sub Form Click() Static s As Integer S =5For i = 1.4 To 2.1 Step 0.6s = s + 1Next
一道VB题,求解答.执行下面的程序段后,s的值为______,并简述计算过程:
执行下面的程序段后,s的值为______,并简述计算过程:
Private Sub Form Click()
Static s As Integer
S =5
For i = 1.4 To 2.1 Step 0.6
s = s + 1
Next i
Print S
End Sub
一道VB题,求解答.执行下面的程序段后,s的值为______,并简述计算过程:执行下面的程序段后,s的值为______,并简述计算过程: Private Sub Form Click() Static s As Integer S =5For i = 1.4 To 2.1 Step 0.6s = s + 1Next
结果为7
s = 5
循环s=s+1两次
s = 5 + 1=6
s = 6 + 1=7