分类：电脑/网络-软件
问题：VB编程~~填空题~~~帮忙~~谢谢!下面程序的功能是输入一个字 
下面的功能是输入一个字符串,统计其中包含的字母,数字和其他字符的个数,并输出. Private Sub Command1-Click() Dim str1 As String Dim i As Integer Dim n1 As Integer,n2 As Integer,n3 As Integer n1:字母的个数;n2:数字的个数;n3:其他字符的个数 str1=InputBox("请输入任意串","字符统计") For i=1to Len(Str1) Select Case---------------- 下面的功能是输入一个字符串,统计其中包含的字母,数字和其他字符的个数,并输出. Private Sub Command1-Click() Dim str1 As String Dim i As Integer Dim n1 As Integer,n2 As Integer,n3 As Integer n1:字母的个数;n2:数字的个数;n3:其他字符的个数 str1=InputBox("请输入任意串","字符统计") For i=1to Len(Str1) Select Case---------------- Case"A"To"Z","a"To"z" n1=n1+1 Case Else ---------------- End Select Next i 在----------处填写 程序代码!!
回答：Private Sub Command1_Click() 
Dim str1 As String 
Dim i As Integer 
Dim n1 As Integer, n2 As Integer, n3 As Integer 
'n1:字母的个数;n2:数字的个数;n3:其他字符的个数 
str1 = InputBox("请输入任意串","字符统计") 
For i=1 To Len(Str1) 
Select Case Mid(Str1, i, 1)
Case"A" To "Z", "a" To "z" 
　　n1 = n1 + 1 
Case Else 
　　If Mid(str1, i, 1) > "0" And Mid(str1, i, 1) < "9" Then
　　　　n2 = n2 + 1
　　Else
　　　　n3 = n3 + 1
　　End If
End Select 
Next i