问题 单项选择题

有以下计算公式:

若程序前面已在命令行中包含math.h文件,不能够计算上述公式的程序段是()

A.y=sqrt(x);

if(x<0)y=sqrt(-x);

B.if(x>0)y=sqrt(x);

else y=sqrt(-x);

C.if(x>=0)y=sqrt(x);

if(x<0)y=sqrt(-x);

D.y=sqrt(x>=0x:-x);

答案

参考答案:A

解析:

应该先判断x是正数还是负数,然后再调用sqrt函数,A选项开始没有判断,所以A错误。

完形填空
I arrived in the United States on February 6, 1997, but I remember my first day there very clearly. My friend was waiting for me when my plane____26____at Kennedy Airport at three o’clock in the afternoon. The weather was very cold and it was snowing, but I was_____27____
excited to mind. From the airport, my friend and I ______28_____a taxi to my hotel. On the way, I saw the skyline of Manhattan for the first time and I stared_____29_____astonishment at the famous skyscrapers and their_____30_____beauty. My friend helped me unpack at the hotel and then_____31____me because he_____32_____go back to work. He_____33_____to return the next day.
______34____ my friend had left, I went to a restaurant near the hotel to get something to eat. Because I_____35____speak a word of English, I couldn’t ____36____the waiter what I wanted. I was very upset and ____37_____to make some gestures, _____38_____the waiter didn’t understand me. Finally, I______39_____the same thing the man_____40_____the next table was eating. After dinner, I started to walk along Broadway______41_____I came to Time Square with its movie theatres, and huge_____42_____people. I didn’t feel tired so I continued to walk_______43_____the city.
When I returned to the hotel, I couldn’t sleep because I ______44______hearing the fire and police sirens(汽笛) during the night. I______45_____awake and thought about New York. I decided that I had to learn to speak English.
小题1:
A.took offB.landedC.got outD.took down
小题2:
A.tooB.soC.veryD.much
小题3:
A.gotB.took upC.got onD.took
小题4:
A.inB.atC.forD.to
小题5:
A.old-makeB.man-madeC.newly-makeD.natural
小题6:
A.had leftB.would leaveC.leftD.was leaving
小题7:
A.mustB.had toC.shouldD.ought
小题8:
A.agreedB.saidC.toldD.promised
小题9:
A.Shortly afterB.Long beforeC.ShortlyD.Soon
小题10:
A.couldn’tB.couldC.didn’tD.did
小题11:
A.askB.sayC.tellD.order
小题12:
A.begunB.startedC.mustD.started to
小题13:
A.andB.soC.thenD.but
小题14:
A.orderedB.bookedC.askedD.got
小题15:
A.onB.forC.atD.to
小题16:
A.whenB.untilC.afterD.before
小题17:
A.crowds ofB.groups ofC.crowd ofD.group of
小题18:
A.aroundB.inC.byD.near
小题19:
A.wasB.wentC.keptD.started
小题20:
A.wasB.layC.laidD.were
单项选择题