已知B的ASCⅡ码为66,以下程序统计由键盘输入的字符串中各英文字母的使用次数。 Dim [10] Fori=65 To 90 pp(i)=0 Next x$=InputBox("Enter a string",K$) x$=U Case$(x$) Fori=1 To Len(x$) n=Asc(Mid$(x$,i,1)) If n>=65Andn<=90Then [11] End If Nexti Fori=65 To 90 If pp(i)>Then Print Chr$(i);pp(i) End If Next
举一反三
- 下面程序的功能是统计字符串中“i”的个数,请填空。 Sub COU( ) Dim n As Integer a$ = "Beijing University of Technology" n = Len(a$ ) For i = 1 To n b$ =Mid$(a$,i, 1) If 【11】 Then x=x + 1 Next Print "x ="; x End Sub
- 下面程序的功能是统计字符串中"i"的个数,请填空。 Sub COU() Dim n As Integer a$="Beijing University of Technology" n=Len(a$) For i=1 To n b$=Mid$(a$,i,1) If ______ Then x=x+1 Next Print "x=";x End Sub
- 有以下程序: Private Sub Form_Activate() Fori=1 to 3 x=3 For i=i to 2 x=x+6 Next Next Print X End Sub 程序运行后,窗体上显示的结果为 (10)
- 有以下程序: Private Sub Form_Activate() Fori=1 to 3 x=3 For i=i to 2 x=x+6 Next Next Print X End Sub 程序运行后,窗体上显示的结果为________
- 下面程序的功能是统计字符串中“i”的个数请填空。 Sub COU( ) Dim n As Integer a$ =" Beijing University of Technology" n = Len(a$) For i = 1 To n b$ = 【15】 If b$ ="i" Then x=x+1 Next Print" x="; x End Sub