作业帮 > 数学 > 作业

十万火急!急求VB高手帮我做一下这倒程序改错题,每个FOUND的下一行都有错误,请改正!

来源:学生作业帮 编辑:神马作文网作业帮 分类:数学作业 时间:2024/11/10 08:48:02
十万火急!急求VB高手帮我做一下这倒程序改错题,每个FOUND的下一行都有错误,请改正!
'【程序改错】
'------------------------------------------------
'题目:以下程序段用于输出100-300的所有素数
'------------------------------------------------
Option Explicit
Private Sub Form_Click()
Dim n As Integer, k As Integer, i As Integer, swit As Integer
For n = 101 To 300 Step 2
k = Int(Sqr(n))
i = 2
'
i = i - 1
End If
Wend
If swit = 0 Then
Print n;
End If
Next n
End Sub
十万火急!急求VB高手帮我做一下这倒程序改错题,每个FOUND的下一行都有错误,请改正!
Private Sub Form_Click()
Dim n As Integer,k As Integer,i As Integer,swit As Integer
For n = 101 To 300 Step 2
k = Int(Sqr(n))
i = 2
'
i = i + 1
End If
Wend
If swit = 0 Then
Print n;
End If
Next n
End Sub
再问: 你估计自己这三个空能答对几个?我就要考试了,很着急,需要正确答案。
再答: 肯定全部正确,经过测试的。