题型:综合题 题类:模拟题 难易度:困难
浙江省杭州市2016年信息技术高考模拟卷九
Private Sub Command1Click()
Dim i As Integer
Dim j As Integer
i = 1: j = 0
list1.clear
Do While i <= 1000
If (i Mod 3 = 2 And i Mod 5 = 3 And i Mod 7 = 2) Then
List1.AddItem i
①
End If
i = i + 1
Loop
Label1.Caption = Str(j)
End Sub
程序代码如下:
Private Sub Command1_Click()
Dim i As Integer
List1.Clear '清除列表框内容
For i = 3 To 97 ___①___ If f(i) And f(i+2)=true Then List1.AddItem Str(i) + " 和 " + Str(i + 2) End If Next i |
End Sub
Private Function f(x As Integer) As Boolean '判断是否为素数,若是返回true,若不是则返回false
………
End Function
试题篮