题型:单选题 题类:常考题 难易度:困难
浙江省慈溪市三山高级中学2018-2019学年高二下学期信息技术第一次月考试卷
Private Sub Command1_Click()
Dim s1 As String, s2 As String, ch As String
s1 = Text1.Text
s2 =””
ch =””
For i = 1 To Len(s1)
ch = Mid (s1, i, 1)
If Asc(ch) <= 122 And Asc(ch) >= 97 Then
ch =Chr(Asc(ch) - 32)
End If
If Asc(ch) >= 65 And Asc(ch)<= 90 Then
ch = Chr(65 + (Asc(ch) - 62) Mod 26)
End If
s2 = s2 + ch
Next i
Text2.Text = s2
End Sub
已知大写字母A的ASCII码值为65,且小写字母的 ASCII 码为对应的大写字母的ASCII码加上32。运行上述程序,若文本框Text1 中的内容为“Text1”,单击命令按钮 Command1,则文本框Text2中将显示( )
试题篮