下列这个Sub过程的功能是:统计字符串中“a”的个数,请在空白处填上合适的代码,将程序补充完整。 Private Sub numCount() Dim num As Integer S$="software And hardware" num=Len(s$) For i=1 To num b$=______ Ifb$="a" Then x=x+1 Next i Print "x=";x End Sub
举一反三
- 下列这个Sub过程的功能是统计字符串中“a”的个数,请在空白处填上合适的代码,将程序补充完整。 Private Sub numCoun() Dim num As Integer s$="software And hardware" num=Len(s$) For i=1 To num b$=______ Ifb$="a"Then x=x+1 Next i Print "x=";x End Sub
- 下面这个Sub过程的功能是统计字符串中“a”的个数,请在空白处填上合适的代码完成程序。 Private Sub numCount() Dim hum As Integer s$ = "software And hardware" num = Len(s$) For i = 1 To hum b$=______ If b$ = "a" Then x = x+1 Next i 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
- 下面程序的功能是统计字符串中“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
- 下面程序的功能是统计字符串中“广的个数,请填空。 Sub COU( ) a$="Beijing University of Technology" Dim n AS Integer n=Len(a$) For i=1 To n b$= 【12】 If 【13】 Then x=x+1 Next i Print "x=";x End Sub