问题 填空题

[说明] 本程序求3~100之间的所有素数(质数)并统计个数;同时将这些素数从小到大依次写入顺序文件E: \dataout.txt;素数的个数显示在窗体Form1上。 [Visual Basic 代码] Private Sub Command1_ Click ( ) Dim count as integer, flag as Boolean Dim t1 as Integer, t2 as Integer (1) Count=0 For t1=3 to 100 Flag=Tree For t2=2 to Int( Sqr ( t1 ) )If (2) Then flag=False Next t2 (3) count= (4) write #1, t1 End if Next t1 (5) Close #1End Sub

答案

参考答案:(1) Open "e:\dataout.txt" For Output as #1 (2) t1 mod t2=0

解析:(3) If t2>Int (sqr(t1))Then (4) count +1 (5) Form1.Print "素数个数"; count

阅读理解

阅读理解。

     In some countries, some people do not like the number 13.They don't think 13 is a lucky number. For

example. they don't like to live on the l3th floor.

     One day, Jack asks some friends to dinner. When all of his friends arrive, he asks them to sit around the

dinner table. He begins to count the people while they are having the lovely food.Suddenly he cried out (大叫),

"Oh, there are thirteen people here!".

     Everyone's face turns white except (除外) Mr Brown. He says slowly with a smile on his face,"Don't

worry (担心), dear friends! We have fourteen people here.My wife will have a baby in a few weeks."

     All of them become happy again."Congratulations (祝贺)!" they say to Mr and Mrs Brown.Then they

enjoy the nice food and have a good time that evening.

1. Jack asks his friends to _______ that day.

A. stand around the table

B. sit around the table

C. count the people

D. cook the food

2. Jack begins to count the people _______.

A. when the people are eating

B. when they say to him

C. when they come in

D. when they go home

3. Jack doesn't want to have _______ people for the dinner.

A. ten

B. twelve

C. thirteen

D. fourteen

4. Why does everyone's face turn white?

A. Because the food is delicious.

B. Because they like the number 13.

C. Because they don't think the number is lucky.

D. Because it is very cold.

5. All the people _______ when Mr Brown tells them about his wife.

A. are crying out

B. are going home

C. are very happy

D. are very worried.

单项选择题