问题 问答题

下面的程序的功能是将数组array下标为奇数的元素相乘(数组的位置是从0开始的),并将乘积存放到变量total中。请在程序的每条横线处填入适当的语句,使程序的功能完整。 注意:请勿改动main()主方法和其他已有的语句内容,仅在横线处填入适当的语句。 public class JiShuJi { public static void main(String args[ ]) { int array[ ]={1,2,3,5,7,9}; long total= ________________________; for(int i=1;i<=__________________ i++) { ____________________ i++; } System.out.println(total); } }

答案

参考答案:

解析:1 array.length-1; total*=array[i]; 本题主要考查for循环语句和数组的知识。解答本题的关键是熟练掌握for循环语句和数组的知识。一个for循环语句一般应包含4部分内容:(1)初始化部分:用来设置循环控制的一些初始条件,如设置计数器等。(2)循环体部分:这是反复执行的一段代码,可以是单一的一条语句,也可以是复合语句(代码块)。(3)迭代部分:用来修改循环控制条件。常常在本次循环结束,下一次循环开始前执行。例如,使计数器递增或递减。(4)判断部分:也称终止部分。是一个关系表达式或布尔逻辑表达式,其值用来判断是否满足循环终止条件。每执行一次循环都要对该表达式求值。解答循环语句题要抓住这四个部分。

阅读理解

Throughout this long, tense election, everyone has focused on the presidential candidates and how they’ll change America. Rightly so. But selfishly, I’m more fascinated by Michelle

Obama and what she might be able to do, not just for this country, but for me as an African-American woman. As the potential First Lady, she would have the world’s attention. And that means that for the first time people will have a chance to get up close and personal with the type of African-American woman they so rarely see.

Usually, the lives of black women go largely unexamined. The prevailing theory seems to be that we’re all hot-tempered single mothers who can’t keep a man. Even in the world of make-believe, black women still can’t escape the stereotype of being neck-swirling, eye-rolling, oversexed females raised by our never-married, alcoholic mothers.

These images have helped define the way all black women are viewed, including Michelle Obama. Before she ever gets the chance to commit to a cause, charity or foundations as First Lady, her most urgent and perhaps most complicated duty may be simply to be herself.

It won’t be easy. Because few mainstream publications have done in-depth features on regular African American women, little is known about who we are, what we think and what we face on a regular basis. For better or worse, Michelle will become a stand-in for us all.

Just as she will have her critics, she will also have millions of adoring fans who usually have little interest in the First Lady. African-American blogs have all written about what they’d like to see Michelle bring to the White House---mainly showing the world that a black woman can support her man and raise a strong black family. Michelle will have to work to please everyone---an impossible task. But for many African-American women like me, just a little of her poise, confidence and intellect will go a long way in changing an image that’s been around for far too long.

69.  Why does Michelle Obama hold a strong fascination for the author?

A. She serves as a role model for African-American women.

B. She possesses many admirable qualities becoming a First Lady.

C. She will present to the world a new image of African-American women.

D. She will pay closer attention to the interests of African-American women

70. What is the common stereotype of African-American women according to the author?

A. They are victims of family violence. 

B. They are of an inferior social group.

C. They use quite a lot of body language.

D. They live on charity and social welfare.

71. What does the author say about Michelle Obama as a First Lady?

A. However many fans she has, she should remain modest.

B. She shouldn’t disappoint the African-American community.

C. However hard she tries, she can’t expect to please everybody.

D. She will give priority to African-American women’s concern.

多项选择题