求vb单词统计
要求:(1)输入任意一段英文.(2)根据(1)中各单词出现概率的高低输出前五个单词.(3)具有输入输出界面...
要求:(1)输入任意一段英文. (2)根据(1)中各单词出现概率的高低输出前五个单词. (3)具有输入输出界面
展开
展开全部
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
更多追问追答
追问
就这些?
追答
说的是英文单词吧,还是英文字母的意思呢
我做的是英文字母
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询