问题 单项选择题

已执行语句x=987654.0321,输出x的值时要求加千位分隔符,小数点后取3位有效数字,下列输出语句中正确的是( )。

A.Print Format$(x,#####,#.###)

B.Print Format$(x,"#,#####.###")

C.Print Format$(x,"#####,###")

D.Print Format$(x,",######.###")

答案

参考答案:B

解析: 本题考查Formats函数的用法。用 Formats函数可以使数值按指定的格式输出。可以在Formats函数中使用的格式有:“#”、“0”“.”、“,”“%”、“$”、“+”、“-”、“E+”、“E-”。其中一个“#”或一个“0”格式符表示一个数字位,其个数决定了显示区段的长度;“.”格式符用于显示小数点;“,”格式符用于在数值中插入千位分隔符。选项A错误,格式说明符没有用括号括起来;选项B正确,格式说明符用括号括起来,格式符“,”和“.”的位置符合使用规则;选项C错误,格式说明符“,”不能放在格式说明符的头部位置;选项D错误。格式说明符“.”一般与“#”格式符不能放在格式字符中小数点左边的头部和尾部。答案为B。

选择题
完形填空
It was my birthday last Thursday and I decided to   26   by inviting a few friends out to supper. I 27   a restaurant in a quiet part of town. It is one of my favorite restaurants because the food is good and the waiters are friendly. It is hardly ever crowded, because  28   people know about it, so it is not usually necessary to book a table. In any case, Thursday is not a busy evening 29 .
When we entered the restaurant, I was surprised to find it completely  30  . I looked around but not a  31    table was free. One of the waiters recognized me. He came across and explained the situation. “A party of tourists came in about   32   ago.” he said. “It was like an invasion! 33    the place was full! We can hardly manage.”
The waiter then  34   a table in the corner. “The people there  35  . ” he said, “Just hold on and you will  36    a place there.” He was right. Fifteen minutes later, the people 37   the corner table paid their bill, got up and left. I led my friends across and we all sat down.
Unfortunately our table was almost out of sight. We tried to attract the attention of the waiter who sent us there, but he, like 38    waiters, 39    the party of tourists. They ordered lots of food. But at last, an hour later, the tourists were finishing their meal and looking very  40    with their service. The waiter now very tired, appeared at our table. I advised (建议) my friends about the best dishes and finally the waiter went off with our 41 .
A few moments later he 42   to our table. We could tell from his face that he had 43   for us. 44   a little embarrassed (尴尬的) he informed us that there was  45    left. “All we can offer you” he said, “is an omelet!(煎蛋卷)”
小题1:  
A.rememberB.celebrateC.memorizeD.congratulate
小题2:  
A.chose  B.selectedC.picked upD.elected
小题3:
A.a fewB.a littleC.few  D.little
小题4:  
A.as a rule   B.as a matter of fact    
C.as usual     D.as is known to all
小题5:  
A.empty   B.fullC.free    D.quiet
小题6: 
A.one    B.anyC.singleD.other
小题7:  
A.a half hour  B.half a hour   
C.half an hourD.an hour half
小题8:  
A.suddenly B.soonC.quicklyD.certainly
小题9:  
A.pointed out  B.pointed over
C.pointed onD.pointed to
小题10:  
A.will leaveB.are about to leave
 
C.are to leaveD.will be leaving
小题11: 
A.findB.find outC.looked for  D.searched
小题12: 
A.by     B.besideC.at    D.near
小题13:  
A.all the other   B.all an other   
C.all the others   D.all other
小题14:  
A.were kept busy B.was busy with
C.kept busy with  D.were busy with
小题15:  
A.excitedB.tiredC.pleasedD.disappointed
小题16:  
A.dishes   B.food    C.menu    D.order
小题17: 
A.wentB.came   C.wasD.returned
小题18:  
A.a good news   B.good news   
C.bad news   D.a bad news
小题19:  
A.Looking   B.Look  C.Looked  D.Looks
小题20:  
A.meat or fish  B.no meat and fish 
C.meat and fish D.no meat or fish