问题 问答题


阅读下列程序和控制流图,将应填入 (n) 的字句写在答题纸的对应栏内。
【程序】
下面是一段求最大值的程序,其中datalist是数据表,n是datalist的长度+
int GetMax (int n, int datalist[]) {
int k=0;
for (int j=1;j<n;j++)
if (datalist[j] > datalist[k])
k=j;
retum k;
【控制流图】

【问题2】
计算控制流图的McCabe环路复杂性。

答案

参考答案:

解析:McCabe环路复杂性为3。

阅读理解
Welcome to our city—Nanning. It is a beautiful city with many trees and flowers. So it is called “Green City”. There are many nice places to visit. Come and enjoy your trip to Nanning.

Place: Nanning Qingxiu Mountain
Location: in the southeast of Nanning
Attractions: green trees, special rocks, beautiful lakes and clean springs
Price: 15 yuan(Adults)
Opening time: 7:00—18:00

Place: Guangxi Science & Technology Museum
Location: Minzu Avenue
Attractions: robot show, Youth Science Studio, the high technology theater
Price: 30 yuan(Adults)
Free (Children below 1.40 m)
Opening time: 9:30 —17:00 (Tuesday—Sunday)
Monday (closed)

Place: Nanning Zoo
Location: in the west of Nanning
Attractions: wild animals, dolphin show, Caribbean Water World
Price: 50 yuan(Adults)
20 yuan (Children 1.20 m—1.40 m)
Free (Childen below 1.20 m)
Opening time: 8:00—17:00

Place: Zhongshan Food Street
 
Location: Zhongshan Road
 
Attractions: different kinds of local flavors(风味), Laoyou Noodles, snails and BBQ
 
Opening time: 6:00p.m.—midnight
 
根据短文内容,选择最佳答案,并在答题卡上按要求作答。
小题1:If Tony likes robots, where do you advise him to go?
A.NanningQingxiu Mountain.
B.Guangxi Science & Technology Museum.
C.Nanning Zoo.
D.Zhongshan Food Street.
小题2:When is Nanning Qingxiu Mountain open for the visitors?
A.At 6:30 am.B.At 10:00 pm.
C.At 6:30 pm.D.At 10:00 am.
小题3:What can you do in Zhongshan Road?
A.Enjoy the special rocks.B.Try delicious food.
C.Watch the dolphin show.D.Learn the knowledge of technology.
小题4:Mrs. White wants to take her son Mike to the zoo. Mike is 1.30 meters tall now. How much will they pay?
A.50 yuan.B.60 yuan.
C.70 yuan.D.100 yuan.
小题5:From the passage, we know _________________.
A.Nanning has some famous places to visit
B.People in Nanning are friendly
C.You can go to the museum on Monday
D.You don’t have to pay for the ticket to Nanning Zoo if you are a child
填空题