问题 单项选择题

有如下程序:
Private Sub Form_Click()
Dim i As Integer, Sum As Integer
Sum=0
For i=2 To 10
If i Mod 2=0 And i Mod 3<>0 Then
Sum=Sum+i
End If
Next
Print Sum
End Sub
程序运行后,单击窗体,输出结果为( )。

A) 12
B) 30
C) 24
D) 18

答案

参考答案:C

解析: 本题程序段的作用是将从2到10中是2的倍数但不是3的倍数的数求和然后输出。在2到10中满足条件的数字是2,4,8,10,所以和是24,故本题的正确答案是选项C)。

完形填空
完形填空。
  Mike and Ann are  1  They live in a large house. The house is  2  the foot of a mountain (big hill). Near the
mountain  3  a lake.   
    There are four people in the family: Mike, Ann, their father and their mother. Their father is a farmer. He  4
 a farm not far from their house. Their mother is at home. She is a housewife (家庭主妇). Mike and Ann go to
school every day. They are  5 , but they are  6 . Mike is in Grade 2. Ann is in Grade 1.   
    Mike likes sports. He likes swimming and playing football. After school he often plays football  7  his
classmates. Ann is a good girl. After school, she often goes home to help her mother  8  the housework.
( )1. A. brothers and sisters
( )2. A. at                 
( )3. A. has                
( )4. A. are working        
( )5. A. at the same school 
( )6. A. in different grades
( )7. A. and                
( )8. A. doing              
B. brother and sister 
B. in                 
B. have               
B. is working         
B. at the same schools
B. in a different grade
B. with               
B. does               
C. a brother and sister
C. under              
C. is there           
C. works on           
C. in the same school 
C. at different grades
C. but                
C. with               
D. a brother and a sister
D. on                   
D. there is             
D. works at             
D. in the same schools  
D. at a different grade 
D. or                   
D. in                   
判断题