题型:综合题 题类:常考题 难易度:困难
浙江省临海市白云高级中学2017-2018学年高二上学期信息技术期中考试试卷
Private Sub Command1_Click()
Dim i As Integer, S As String
Dim str As String, ch As String
str = Text1.Text
List1.Clear
For i = 1 To Len(str)
ch = ①
S = convert(ch)
List1.AddItem ch & "==>" & S
Next i
End Sub
Private Function convert(ch As String) As String
Dim m As Integer, k As Integer, n As Integer, i As Integer
convert = ""
n = Asc(ch)
Do While n > 0
②
convert = m & convert
If m = 1 Then
k = k + 1
End If
n = n \ 2
Loop
For i = 1 To 7 - Len(convert) '将字符的二进制代码补足7位
convert = "0" & convert
Next i
If k Mod 2 = 0 Then
convert = ③
Else
convert = "0" & convert
End If
End Function
程序中划线处①的代码应为。
程序中划线处②的代码应为。
程序中划线处③的代码应为。
试题篮