问题 单项选择题

程序设计语言一般都提供多种循环语句,例如实现先判断循环条件再执行循环体的while语句和先执行循环体再判断循环条件的do-while语句。关于这两种循环语句,在不改变循环体的条件下,()是正确的。

A.while语句的功能可由do-while语句实现

B.do-while语句的功能可由while语句实现

C.若已知循环体的次数,则只能使用while语句

D.循环条件相同时,do-while语句的执行效率更高

答案

参考答案:B

解析:

do-while语句的循环体至少执行一次,即执行1~n次,而while语句的循环体可以不执行,也可以执行n次,因此do-while语句的功能可由while语句实现。

阅读理解
阅读理解。
British Study Tours
Using the wonderful railway system we offer
an unusual holiday, sport and study programme.
Your hotel is a train; eat and sleep on the train
and spend each day in a different part of Britain.
Summer School in France
We offer summer schools for students
between the ages of 12 and 16. Live with
a French family and choose from different
activities including horse-riding, football,
swimming and skiing.
Summer in Australia
We will arrange a programme for your students.
All our courses take place at the college in Sydney.
Morning classes are held in Chinese; evening classes
on Australian history are in English. We offer an
exciting programme of evening activities including
music, dance and theatre.
Holiday
Programmes in Germany We offer morning
classes in German at all levels from beginners
upwards. In the afternoon you are free to join
in our mountain walks or to go shopping in the
nearby town. In the evening we organize a full
programme for fun. All ages welcome.
1. If you like travelling by train, you can go to ______.
A. Summer School in France
B. Summer in Australia
C. Holiday Programmes in Germany
D. British Study Tours
2. If you want to improve your English, which programmes will you choose?
A. Holiday Programmes in Germany and British Study Tours.
B. Summer in Australia and Summer School in France.
C. British Study Tours and Summer in Australia.
D. Summer School in France and Holiday Programmes in Germany.
3. "Summer School in France" is different from the others in that _____.
A. You can go at any time of the year
B. You can stay with a local family
C. You can go at any age
D. You can do sports
4. This passage was written to _____.
A. encourage people to have a holiday
B. introduce some beautiful places
C. ask people to study foreign languages
D. attract people to take part in their programmes
判断题