试题 试卷
题型:综合题 题类:常考题 难易度:普通
浙江省杭州市五县七校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
图a
图b为标准ASCII码表供你参考(其中ASCII为1-32,127的字符为特殊符号,不能用作密码):
图b
实现上述功能的VB程序代码如下,请回答以下问题:
n = Val(Text1.Text)
k = a(1)
For i = 2 To n
If a(i) < k Then k = a(i)
Next i
Text2.Text = Str(k)
假设在文本框Text1中输入“8”,则文本框Text2中输出的值是( )
For i = 1 To Len(Text1.Text)
c = Mid(Text1.Text, i, 1)
If c >= "0" And c <= "9" Then c = Chr(Asc(c) + 1)
If c >= "A" And c <= "Z" Then c = Chr(Asc(c) + 32)
s =s + c
若文本框Text1的内容为“Number 2468!”执行程序后,变量s的值为( )
x=Text1.Text
p=0
For i=1 to Len(x)
If Mid(x,i,1)=“a” Then p=p+1
Print p
若程序运行时,在文本框Text1中键入“Are you happy”,则运行结果是( )
试题篮