数学
vb的题,不难的,三、设计一个算法,求100以内能被3整除的所有正整数并用流程图描述出来,然后根据流程图编写出程序.共1题)(答案:略)四、阅读程序写出程序运行结果(20分,共1题)Dim I as integer,S as integerS=0For I=2 to -12 step –3S=S+INext IPrint “S=”;S运行结果:五、补全下列程序:共2题)1、Private Sub Command1Click()Dim i As Integer,j As Integer,x As Integ

2019-04-13

vb的题,不难的,
三、设计一个算法,求100以内能被3整除的所有正整数并用流程图描述出来,然后根据流程图编写出程序.共1题)(答案:略)
四、阅读程序写出程序运行结果(20分,共1题)
Dim I as integer,S as integer
S=0
For I=2 to -12 step –3
S=S+I
Next I
Print “S=”;S
运行结果:_____________五、补全下列程序:共2题)
1、Private Sub Command1_Click()
Dim i As Integer,j As Integer,x As Integer
x = 4
For i = 1 To 4
For j = 1 To 3
x = x + 6
_____________
_____________
Print “x=”;x
End Sub
2、编写计算 1 + 1/2 + 1/3 + 1/4 + .+ 1/100 的程序,请填空补充完善程序.
Private Sub Command1_click()
Dim a As Double,b As Double,i As Integer
a = 0
For i = 1 To_____
b = ________
a = a + b
Next i
Print “运算结果=”;a
End Sub
优质解答
三、
Dim i As Integer
For i = 1 To 99
If i Mod 3 = 0 Then Debug.Print i
Next i
四、S=-20
五、1、Next j;Next i
2、100;1/i
三、
Dim i As Integer
For i = 1 To 99
If i Mod 3 = 0 Then Debug.Print i
Next i
四、S=-20
五、1、Next j;Next i
2、100;1/i
相关问答