题型:填空题 题类:模拟题 难易度:困难
浙江省杭州市2016年信息技术高考模拟卷十一
Privvate Sub Command1Click( )
Dim man As Integer,woman As Integer,child As Intger,s As Integer
For woman = 1 To 15
Child = 30 – man – woman
S = 20 * man + 30 * woman + 10 * child
If Then
List1.AddItem Str(man) + Str(woman) + Str(child)
End If
Next woman
Next man
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
试题篮