[单项选择题] 下面程序运行时,若输入“Visual Basic Programming”,则在窗体上输出的是( )。 Private Sub Command1_Click() Dim count
14 查阅
[单项选择题] 下面程序运行时,若输入“Visual Basic Programming”,则在窗体上输出的是( )。
Private Sub Command1_Click()
Dim count(25) As Integer, ch As String
ch = UCase(InputBox("请输入字母字符串"))
For k=1 To Len(ch)
n = Asc(Mid (ch, k, 1)) - Asc("A")
If n > = 0 Then
count (n) = count (n) + 1
End If
Next k
m = count(0)
For k=1 To 25
If m < count(k) Then
m = count (k)
End If
Next k
Print m
End Sub
A. 0
B) 1
C. 2
D) 3
参考答案: