试题 试卷
题型:综合题 题类:常考题 难易度:普通
浙江省杭州市五县七校2016-2017学年高二上学期期中联考信息技术试题
Private Sub Command1_Click()
Dim x as '定义 x 为整型
x = Val(Text1.Text)
Then '条件语句
Text2.Text=
Else
Text2.Text = Str(0.2 + 0.1 * (x - 3))
End If
End Sub
单击“计算”按钮Command1后,则在文本框Text2中显示的内容是{#blank#}1{#/blank#},在文本框Text3中显示的内容是{#blank#}2{#/blank#}。
Private Sub Command1Click()
Dim s As Integer, t As Integer, n As Integer
n = Val(Text1.Text)
t = 0
s = 0
For i = 1 To n
If Int(Sqr(i)) = Sqr(i) Then
s = s + i
t = t + 1
Next i
Text2.Text = Str(t)
Text3.Text = Str(s)
Dim n As Integer, s As Integer, i As Integer
n=Val(Text1.Text)
s=0
For i=1 To n Step 2
s=s+i
Text2.Text=Str(s)
图1
i=1
Do While i<=n
i=i+2
Loop
图2
当n的值为10时,关于该两段程序,下列说法不正确的是( )
当输入a,b的值分别为5,7,该算法的输出结果为( )
试题篮