问题 单项选择题

下面程序的输出结果是( )。
public class Sun

public static void main (String args[ ])

int x=0;
for (int i=1; i<=4; i++)

x=4;
for (int j=1; j<=3; j++)

x=3;
for(int k=1;k<=2;k++)

x=x+6;




System.out.println (x);

A.7

B.15

C.157

D.538

答案

参考答案:B

解析: 本题考查对for循环嵌套的理解。此题中应用3重for嵌套循环,要注意每次执行完变量k的最内层循环后,得到的x值为15,无论x赋值为3或4,执行到最内层循环都被新值覆盖。因而i分别等于1,2, 3执行结束时,x的返回值是15:i分别等于 1,2,3,4执行结束时,x返回值依然是15。故本题答案是B。

完形填空

阅读表达。

阅读短文,按要求完成短文后的各项任务。

     Success comes from good habits. The most important reason that helps you succeed is what you do every

single day. Your habits are so important that they will decide whether you are successful or not. If you have

strong and healthy positive (积极的) habits, it does not matter whether or not you fail today because you are

guaranteed (保证) to succeed in the long run. Having positive habits does not mean that you will succeed every

single time. However, in the long term, there is no doubt that you will achieve all your goals and be successful.

     A single positive action will not change your life, but the same action repeated l,000 times will have an

important (1)_______ _______ your life. For example, if you listen to English only one time, you won't see a

big difference in your English studying. However, if you listen to English l,000 times over a five-year period,

you will find you've made progress in English. The same principle applies to (适用于) health, relationships,

work and school. (2)Simple positive actions repeated every single day will change your life in the long run.

     Everybody can change. All it takes is courage and persistence (毅力). Decide right now to improve your

life by changing your habits. Take actions right now! Don't be afraid. You will probably make mistakes along

the way, but never forget that success is guaranteed for you if you have good habits in your life. And if you

refuse to give up, success will be yours.

1. 在(1)句的空白处分别填入一个适当的词使句意完整、上下文通顺.

____________ ___________

2. 将(2)句译成中文.

__________________________________________________________

3. 回答问题: Why are habits so important?

__________________________________________________________

4. 在文中找出与 If you never stop, you'll be successful. 意思相近的句子.

__________________________________________________________

5. 在文中找出最能表达该短文主题的句子.

__________________________________________________________

多项选择题