无
*注意事项:
For i = 1 To 10 Step 4
s = s + i
Next i
该程序段运行后,语句s = s + i执行的次数是( )。
Dim i As Integer, sum As Integer
sum = 0
For i = 2 To 10
If i Mod 2 <> 0 And i Mod 3 = 0 Then
sum = sum + i
End If
Print sum
End Sub
程序运行后,单击窗体,输出结果为。
下列程序的功能是:当x<50时,y=0.8×x;当50≤x≤100时,y=0.7×x;当x>100时,输入的数据超出范围。请填空。
Private Sub Command1_Click()
Dim x As Single
x=InputBox("请输入x的值!")
Case x < 50
y=0.8 * x
Case 50 To 100
Print "输入的数据超出范围!"
End Select
Print x, y
微信扫码预览、分享更方便
详情