问题 填空题

在窗体上画1个命令按钮,其名称为Command1,然后编写如下事件过程:Private Sub Command1_Click() Dim arr(1 To 100) As Integer For i = 1 To 100arr(i) = Int(Rnd * 1000) Next i Max = arr(1) Min = arr(1)For i = 1 To 100If _________ ThenMax = arr(i) End If If _________ ThenMin = arr(i) End If Next iPrint "Max="; Max, "Min="; MinEnd Sub程序运行后,单击命令按钮,将产生100个1000以内的随机整数,加入数组arr中,然后 查找并输出这100个数中的最大值Max和最小值Min,请填空。

答案

参考答案:Max < arr(i) , Min > arr(i)

解析:本题的基本思路是通过二个中间变量 Max 及 Min 来记录当前已比较数值中的最大值及最小值,如果 待比较的数大于 Max,则将当前值赋值给 Max,如果当前待比较值小于 Min,则将当前数赋值给 Min,当 比较结束时,Max、Min 分别为这组数中的最大值及最小值。故第7空应填 Maxarr(i)或其等效形式。

阅读理解
阅读理解。
Timetable
Monday to Friday
Oxford London Paddington Oxford London Paddington
09:05 10:01 11:15 12:14 09:05 10:42 11:45 12:44 10:05 11:04 12:00 12:56 10:35 11:34 12:15 13:14
Membership (会员 ) Card
Friends     Membership       Card THE HAMILTON PLAYHOUSE
00136789
Valid until 23 May 2010
Name:Miss E. M. Driscoll
Box office:10865 305305
THE HAMILTON
PLAYHOUSE
     When booking always ask for your Friends Discount. Give your membership
number when booking. Please bring your card with you when collecting tickets.
Your membership card is valid until the date shown on the front.
     This card is your proof (证明) of membership-please keep it safe at all times.
U.S. Families with a Computer(percentage)

Menu
French Slam $ 4. 29
French toast,2 eggs and style,2 pieces of bacon and 2 sausage links.
Sandwich with Salad or Soup $4.35 Chicken breast on bread.
Served with your choice of garden sal ad, Caesar salad, vegetables beef or soup of the day.
The Classic Hamburg $4.99 Over l/3 pound.
Topped with tomato, red onions and cheese.
Chicken-fried Steak $5.09
A southern style! Goldenfried and covered with French cheese.
The Super Bird $5.49 Thin flat pieces of chicken breast with Swiss cheese, bacon and tomato on bread.
Chinese Chicken Salad $5.99 Chicken breast, mushroom, green peppers, and onions.
Topped with tomatoes and fried noodles. Served with bread.
1. Which of the following is true of the membership card?
A. Its number is 10865 305305.
B. It belongs to Mr. E. M. Driscoll.
C. It is valid through the year of 2010.
D. It gets the owner a discount when used.
2. If one wants to attend a business lunch in London at 12:00, the latest train that he should
    take at Oxford leaves at _____.
A. 11:45
B. 11:15
C. 10:35
D. 10:05
3. If you would like to have some vegetable beef, what may be your choice?
A. French Slam( r)
B. Chicken-Fried Steak( r)
C. The Super Bird( r)
D. Sandwich with Salad or Soup( r)
4. The chart shows that from 2005 to 2008,___.
A. the percentage of the Spanish families with a computer rose 35 points
B. the percentage of the White families with a computer re mained unchanged
C. the number of the Black families with a computer was on the decrease
D. the number of the Asian families with a computer showed the sharpest increase
单项选择题