题库 高中信息

题干

有如下 VB 程序段:
Dim p As Integer, q As Integer, s As Integer, t As Integer
p = Val(Text1.Text)
t = 0
For q = p+ 1 To 2 * p
s = (p * q) Mod (q - p)
If s = 0 Then
t = t+ 1
End If
Next q
Label1.Caption = Str(t)
该程序段运行时,在文本框T extl中输入8 , 则在标签Labell中显示的内容是()
A.3B.4C.5D.6
上一题 下一题 0.99难度 选择题 更新时间:2019-03-02 03:12:10

答案(点此获取答案解析)