题型:综合题 题类:常考题 难易度:普通
浙江省瑞安市上海新纪元高级中学2019-2020学年高二上学期信息技术学考模拟试卷
图a
图b
Private Sub Command1_Click()
Dim n As Integer, i As Integer, s As Integer, x As Integer, f As Boolean
n = Val(Text1.Text)
f = False: s = 0
i = 2
Do While f = False
x = 2
Do While x <= Int(Sqr(i)) And i Mod x <> 0
①
Loop
If x > Int(Sqr(i)) Then
s = s + 1
If ② Then
Label2.Caption = "第" & Str(n) & "个素数是:" & Str(i)
f = True
End If
End If
i = i + 1
Loop
End Sub
① ②
试题篮