问题 单项选择题

当变量X在奇偶数之间变化时,下列程序的输出结果为( )。 CLEAR X=0 DO WHILE X<6 IFINT(X/2)=X/2 "CHINA" ENDIF "中国" X=X+1 ENDDO

A.CHINA 中国 中国 连续显示3次

B.中国 中国 CHINA 连续显示3次

C.CHINA 中国 中国 连续显示2次

D.中国 中国 CHINA 连续显示2次

答案

参考答案:A

解析: DO WHILE-ENDDO语句的格式为: DO WHILE<条件> <命令序列> ENDDO 执行该语句时,先判断DO WHILE处的循环条件是否成立,如果条件为真,则执行DO WHILE与ENDDO之间的<命令序列>(循环体)。当执行到ENDDO时,返回到DO WHILE,再次判断循环条件是否为真,以确定是否再次执行循环体。若条件为假,则结束该循环语句,执行ENDDO后面的语句。 先将0赋给变量X,使用一个DO WHILE循环语句来操作,判断条件是变量X是否小于6,如果大于或等于 6,则退出循环,否则执行循环体。通过INT(取整函数)取得X除以2的值的整数部分,判断该整数部分是否等于X除以2的值,如果相等,则输出“CHINA”,然后输出“中国”,再执行X=X+1,重复此循环体的操作。所以 X=0时,INT(X/2)=0,X/2=0,输出“CHINA”,然后输出“中国”;执行X=X+1,此时X=1,INT(X/2)=0,X/2=0.5,这两个值不相等,输出“中国”。以此类推,最终结果是“CHINA 中国 中国 ”连续显示3次。

阅读理解

首先请阅读下列国外媒体上的插图及提示性文字:

         

   

以下是关于这些插图的简要评论。请把评论与相关插图及提示性文字匹配起来。

小题1:The debate has been raging for years over the safety of, and necessity for, childhood vaccinations, which has been so much so that it is termed "The Vaccine War". The debate has only a few moments that might be inspiring to those who have been following this now familiar issue.

小题2:There are certainly benefits of using a star in a film. It makes the film easier to market. Stars also help sell more tickets and drive DVD sales, which are a big part of studio revenue. However, a star does not guarantee success. The simple fact is that if you pay a star a great deal of money for a film that people don't want to see, then it won't work.

小题3:They are barely in their twenties and are already multimillionaires. At the age when many people are looking for their first job, the youngsters of The Sunday Times Rich List are buying country estates or jetting off to their overseas homes. Daniel Radcliffe, for example, who plays Harry Potter, has a fortune of 42 million, at 20.

小题4:Millions of jobless Americans, who might be suffering in anxiety and lacking a sense of security, are showing up at emergency rooms of state-owned hospitals, contributing to a longer waiting time and a higher risk of cursory treatment by overworked doctors and nurses.

小题5:Alice Miller, a psychology expert, who died at 87 at home in Provence, France, on April 14, repositioned the family as a central place of abnormal psychological function with her theory that parental power and punishment lay at the root of nearly all human problems.

问答题