问题 单项选择题

下面程序的功能是把316表示为两个加数的和,使两个加数分别能被13和11整除,在划线处应填入的选项是 #include<iostream.h> voidmain( ) {inti=0,j,k;do{i++;k=316-13*i;}while(_____);j=k/11;cout<<"316=13*"<<i<<"+11*"<<j; }

A.k/1l

B.k%11

C.k/11==0

D.k%11==0

答案

参考答案:B

解析:解析:do-while语句的一般形式是do{语句}while(表达式);特点是:“直到型”循环结构。先执行一次“语句”,判“表达式”,当“表达式”为非0,再执行“语句”,直到“表达式”的值为0时停止执行语句。在一般情况下,用while和do-while语句解决同一问题时,若二者的循环体部分是一样的,它们的结果也一样。但当while后面的“表达式”一开始就为“假”时,两种循环的结果不同。这是因为此时while循环的循环不被执行,而do-while循环的循环体被执行一次。本题的关键是两个加数分别能被13和11整除,在i=0时,直接将316赋值给k,当k%11的值为0时,则不必执行循环,将执行j=k/11语句,输出结果,所以该表达式合理的条件是k5%11。

阅读理解

Directions:Read the following passage.Answer the questions according to the information given in

the passage.

     For thousands of years, the most important two buildings in any British village have been the church and the pub. Traditionally, the church and the pub are at the heart of any village or town, since it is where the

people gather together to socialize and exchange news. After all, the word "pub" is actually short for "

public house".

     As a result of this sort of history, British pubs are often old and well preserved. Many of them have

become historic sites. The most famous example is the pub in the city of Nottingham called "Ye Olde Trip

to Jerusalem", which dates back to the year 1189 AD and is probably the oldest pub in England.

However, British pubs are not just for kings and queens; they welcome people from all classes and parts of society. On a cold night, the pub's landlord or landlady can always find a warm place for you by the fire.

There is always honest and hearty food and plenty of drink available at an affordable price.

     That's how things used to be. Things are beginning to change. It is said that the credit crunch(信贷紧缩) is causing 39 British pubs a week to go out of business. People do not have enough spare money to

spend on beer. Recently, the UK government banned smoking in all pubs, and that may also have affected the number of customers going to pubs.

As you can see, British pubs now offer something for everyone. A lot of pubs used to be "working men's

clubs", meaning that women could not usually enter. Today, however, women can freely enter 99% of

pubs without experiencing any problems. Perhaps things are changing for the better after all.

1. Why are British pubs often so old and well preserved?(No more than 19 words)

________________________________________________________________________

2.Why are so many British pubs going out of business? (No more than 5 words)

________________________________________________________________________

3. What in pubs attracts people from all classes? (No more than 13 words)

________________________________________________________________________

4. What is the passage mainly about? (No more than 9 words)

________________________________________________________________________

多项选择题