问题 单项选择题

在窗体上添加一个命令按钮,然后编写其单击事件过程为:

For i=1 To 3

x=4

For j=1 To 4

x=3

For k=1 To 2

x=x+5

Next k

Next j

Next i

MsgBox x

则单击命令按钮后消息框的输出结果是( )。

A.7

B.8

C.9

D.13

答案

参考答案:D

解析: 本题考查VBA中多重循环的知识。见到多重循环的问题不要害怕,认真地分析清楚每一次循环这种问题就迎刃而解了。比如这个例子,我们看到,在每一次外循环开始的时候都把x的值置为4,所以我们只分析最后一次循环就可以了;同理中层循环每一次开始前都把x置为3,所以这个问题最后实际上就是x的初值为3,执行最内层循环直到结束就可以了。分析程序得知内循环执行两次,所以最后的萨3+5+5=13。

选择题
阅读理解

D

Sydney—Mobile phone has become a problem for middle schools. Some middle schools in Australia have banned students from carrying mobile phones during school hours.

Mobile phone use among children has become a problem for the school this year. Several children have got mobile phones as Christmas gifts, and more students want them.

Mary Bluett, an official, said mobile phone use is a distraction (分心的事) to students during school hours and it also gives teachers so much trouble in their classrooms. Teachers were also saying that sometimes students might use phone messages to cheat during exams.

She said some schools had tried to ban mobile phones. Some parents felt unhappy because they couldn’t get in touch with their children.

Many teachers said students should not have mobile phones at school, but if there was a good reason, they could leave their phones at school offices. They also said there were many reasons why the students should not have mobile phones at school: they were easy to lose and were a distraction from studies.

Many people say that they understand why parents would want their children to have phones, but they think schools should let the students know when they can use their mobile phones.

78. We know from the passage that some children get mobile phones from          .

A. the makers and sellers                      B. their parents and friends

C. some other strangers                            D. some mobile phone users

79. Some parents felt unhappy because they couldn’t_________during school hours.

A. use their mobile phones                     B. leave their mobile phones

C. help the teachers with their work             D. get in touch with their children

80. The underlined word “they” in the fifth paragraph refers to_______.

A. mobile phones                               B. some messages

C. many teachers                                          D. some students

81. The topic mainly talked about in the text is___________.

A. when the students of some Australian schools can use their mobile phones

B. why the students should not use mobile phones in some Australian schools

C. whether the Australian students can have mobile phones at school

D. how some parents feel when their children should not carry mobile phones