这道vb题怎么做?
1个回答
展开全部
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim dzimu As Integer, xzimu As Integer, shuzi As Integer, a As Integer
dzimu = 0 : xzimu = 0 : shuzi = 0
For i = 1 To Len(TextBox1.Text)
a = Asc(Mid(TextBox1.Text, i, 1))
Select Case a
Case 97 To 122
xzimu = xzimu + 1
Case 65 To 90
dzimu = dzimu + 1
Case 48 To 57
shuzi = shuzi + 1
End Select
Next
MsgBox("有" & dzimu & "个大字幕" & "," & xzimu & "个小字幕" & "," & shuzi & "个数字")
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询