问题 单项选择题

在窗体上画一个名称为Command1的命令按钮和一个名称为Text1的文本框,然后编写
如下事件过程:
Private Sub Command1_Click()
n = Val(Text1.Text)
For i = 2 To n
For j = 2 To Sqr(i)
If i Mod j=0 Then Exit For
Next j
If j>Sqr(i)Then Print i
Next i
End Sub
该事件过程的功能是

A.输出n以内的奇数

B.输出n以内的偶数

C.输出n以内的素数

D.输出n以内能被j整除的数

答案

参考答案:C

解析: 为了判断一个数n是不是素数,可以将n被2到根号2之间的所有整数除,如果都除不尽,则n就是素数,否则不是素数。本题是典型的判断素数的程序语句。故选择C项。

阅读理解

阅读理解。

     At first, Betty and Barney felt comfortable in the alien space station. They were not afraid because the

aliens were very friendly. They stood around and looked at them. Some of them pointed at Betty and Barney

and spoke to each other in a language they didn't know.

     After about thirty minutes, the aliens began to feel them and to check them. They were very interested in

Betty's and Barney's bodies. Then, some of the aliens cut pieces of hair from Betty's and Barney's heads and

took small pieces of skin from their bodies. They were like scientists. Why were they doing this?

     Betty became frightened when one alien came towards her with a long, thin needle. It placed the needle

over the centre of her stomach and pushed it in. Betty was surprised,"It was a strange feeling. There was no

pain," she said later.

     Barney had false teeth which he could take out of his mouth. When the aliens discovered the teeth, they

became very interested in them. One by one they came up to Barney and took out his teeth, then put them

back in. They did this again and again, and they all made a strange sound when they did this. Barney thought

they were laughing.

1. Where were Betty and Barney? They were _________.

A. at home

B. in a cinema

C. in a hospital

D. in a space station

2. Why did the aliens take Betty's and Barney's hair and skin? Because they wanted _________.

A. to eat them

B. to research them

C. to sell them

D. to stay with them

3. According to the story, put the following sentences into the right order: _________.

a. The aliens played with Barney's false teeth.

b. An alien put a long, thin needle into Betty's stomach.

c. The aliens looked at Betty and Barney friendly.

d. The aliens cut pieces of hair from Betty and Barney. 

A. b-a-c-d

B. b-a-d-c

C. c-d-b-a

D. c-d-a-b

4. Suppose the story is from a movie, what kind of movie can it be? It can be a (an) _________.

A. comedy

B. documentary

C. action movie

D. science fiction movie

多项选择题