题目

在一篇英语短文中统计某字母开头的单词个数的程序,短文以“.”结束,单词之间用空格分隔,单词首写没有大写字母,没有缩写或其他特殊形式。部分程序代码如下所示: s= Text1. Text    '输人的英语短文 t= Text2. Text    '要统计的开头字母 b=Len(s): f = True For i=1 To b   c = Mid(s, i, 1)   If   ①   Then     n= n+1       ②      ElseIf c = "" Or c= "." Then       ③     Else     f = False   End If Next i Label1.Caption= "以" + t + "为开头的单词个数:" + Str(n) 为实现上述程序,划线处应填入的代码是(    ) A . ①f and c=t②f= False ③f= True B . ①f=False and c=t②f= False ③f= True C . ①c=t②f= True③f= False D . ①f= True and c=t②f= True③f= False 答案:A
信息技术 试题推荐
最近更新