问题 单项选择题

以下能够正确计算n!的程序是( )。

A.Private Sub Commandl_C1ick()

B.hiVate Sub Commandl_C1ick() n=5:x=1 n=5:x=1:i=1 DO DO X=x*1 X=X*1 i=i+1 i=i+1 Loop while i<n Loop While<n Print xPtinte x End Sub End Sub

C.Private Sub Commandl_Click ()

D.Pdvate Sub Commandl C1ick() n=5:X=1:i=1 n=5=:x=1:i=1 DODO X=X*1 X=X*1 i=i+1 i=i+1 Loop While i>n Print x Print x End Sub End Sub

答案

参考答案:C

解析: 本题考查Do While语句的用法。首先我们知道n!=1×2×3×……×(n-1)×n,由于是累乘,因此x和i的初值都必须为l;其次就是循环执行条件的确定,由于使用的是 While型循环,表示在满足条件时执行循环体中的代码,这里满足执行循环的条件应该是 i<=n。选项A和B的循环条件都是i<n,少了 i=n的一次循环,实际上只执行了n-1次;而选项D则从i>n时才开始执行,不合题意;同时,选项B没有指定i的初值,系统会默认i;0,这也不合题意。本题正确答案为选项C。

完形填空

.

第二节完形填空(共20小题;每小题1分,满分20分)

阅读下面短文,掌握其大意,然后从36--55各题所给的四个选项(A. B.C和D)中选出最佳选项,并在答题卡上将该项涂黑。

Mrs. Thompson once taught in an elementary school. On the very first day of school, like most

teachers, she said that she    36  them all the same. But it was a  37    because that was impossible.A little boy named Teddy did not play well with the other children, and with  38 clothes,constantly needed a bath. It got to the point  39  Mrs.Thompson would take delight in  40  hispapers with a broad red pen, making bold X's and putting a big "F" at the top. One day, Mrs. Thompson was required to  41  each child's past records, and she put Teddy's off till last.42,when she reviewed his file, she was in for a  43.She learned he was once a(n)  44  child. Unfortunately,his mother had a terminal illness and died, making Teddy withdrawn. Since then, he hadn't shownmuch    45    in school.

Mrs. Thompson realized the problem and felt  46  From that day on, she paid particularattention to Teddy. As she worked with hiITl, his mind seemed to come  47.The more sheencouraged hlm, the quicker he48.By the end ofthe year, Teddy had become one of the 49 students in the class.

Ten more years passed. One day, Mrs. Thompson received a letter from Teddy saying he wasgoing to be    50  and was wondering if Mrs. Thompson would agree to take the place at thewedding usually  51  for the mother of the groom.

Ofcourse, she agreed. They hugged each otlier and Teddy whispered in her ear, "You are the best

52  Ihave ever had. Thank you for believing in me, making me feel  53  and showing me that I could make a difference."

With tears in her eyes, Mrs. Thompson  54  back, "Teddy, you were the one who taught me I

could make a difference.I didn't know how to  55  until I met you."

36.A.knew       B.loved       C.recognized    D.admired

37.A.promise     B.dream       C.decision     D.lie

38.A. neat        B.costly       C.dirty       D.cheap

39.A.where       B.that         C.which      D.how

40.A.preparing    B.writing      C.examining    D.marking

41.A.review      B.arrange      C.list         D.remark

42.A.Therefore    B.Otherwise    C.However    D.Besides

43.A.delight      B.surprise      C.fear       D.puzzle

44.A.naughty     B.enthusiastic    C.lonely     D.excellent

45.A.power       B.interest     C.honor       D.concern

46.A.ashamed     B.proud       C.curious     D.doubtful

47.A.true         B.w eak       C.alive       D.strong

48.A.responded    B.marched     C.answered    D.went

49.A.worst        B.smartest     C.strongest    D.busiest

50.A.employed     B.registered    C.settled     D.married

51.A.made         B.designed    C.reserved    D.booked

52.A.teacher       B.mother     C.friend      D.classmate

53.A.necessary    B.important    C.negative    D.responsible

54.A.called       B.smiled       C.whispered   D.gestured

55.A.study      B.Iive         C.behave     D.teach

单项选择题