问题 单项选择题

有如下程序:
#include<iostream>
using namespace std;
int main()
int f, f1=0, f2=1;
for(int i=3; i<=6; i++)
f=f1+f2;
f1=f2; f2=f;

cout<<f<<end1;
return 0;

运行时的输出结果是( )。

A.2

B.3

C.5

D.8

答案

参考答案:C

解析: 在主函数中for循环语句执行4次,第一次循环结束时,变量f的值等于1,f1的值等于1,f2的值等于1;第二次循环结束时,变量f的值等于2,f1的值等于1,f2的值等于2;第三次循环结束时,变量f的值等于3,f1的值等于2,f2的值等于3;第四次循环结束时,变量f的值等于5,f1的值等于3,f2的值等于5;结束循环。

阅读理解

Have you felt annoyed when a mobile phone rings during the class? Something must be done to stop this. Now in New York City, USA, a rule is carried out* in schools. Students can’t even bring mobile phones to school. Is it a good thing or not?

Anxious* parents say that mobile phones are an important tool* in holding New York City’s families together.

“I worry about it,” said Elizabeth Lorris Ritter, a mother of a middle school kid. “It’s necessary in our everyday life. We have a washing machine*, we have running water, and we have mobile phones. A number of Americans think mobile phones connect* them to children on buses, getting out from subways, walking through unknown* places.

“I have her call me when she gets out school,” said Lindsay Walt, a schoolgirl’s mother. “No one in New York is going to let their children go to school without a mobile phone.

What about the mobile phone owners, the students? Most of the students said that mobile phones were necessary and the mobile phone was like an extra* hand or foot for them.

“I feel so bored,” said May Chom, 14. “There is also no way to listen to music on the way to school without my phone. It will be a really, really boring trip.

小题1:Elizabeth Lorris Ritter is worried that ______________.

A.students are not allowed to bring mobile phones

B.students spend too much time in listening to music on the mobile phones

C.students bring mobile phones to school and they often ring during the class

D.no rule is carried out to stop students from bringing mobile phones to school小题2:____________ American parents disagree with the rule that students can’t bring mobile phones to school.

A.Some.

B.Many

C.Few

D.No小题3:May Chom likes to ______________.

A.go to school without a mobile phone

B.chat with her friends on the mobile phone on the way to school

C.walk through interesting places with a mobile phone

D.bring a mobile phone to school小题4:This writer wants to tell us the __________ in carrying out* the rule not to use a mobile phone in school.

A.importance

B.problem

C.happiness

D.hopeless

单项选择题