一、選擇題:
1—12: DCADD BBDAC CB
二、填空題
1.42 2.Index 3.41
4.A(i)=a(11-i) a(11-i)=Tmp
5.1 6.X Mod 7=0 7.210
8.0 To 8 i+1 To 9
9.3 K 1
10. 1001 Max MaxMax)
三、編程題
1.Private Sub C1_click()
If OP1(0).Value=True Then P1.Print “選擇了橢圓形”
If OP1(1).Value=True Then P1.Print “選擇了圓形”
If OP1(2).Value=True Then P1.Print “選擇了正方形”
End Sub
2.統(tǒng)計(jì)按鈕名為Command1,輸入框名為text1,輸出框?yàn)?/span>text2(MultLine設(shè)為True)
Private Sub Command1_click()
Dim X(1 to 26) AS Integer,I As Integer
Dim S As String,L As Integer
L=Len(Text1.text)
For i=1 To L
S=Mid(Text1,I,1)
S=Ucase(S)
If S >= "A" And S <= "Z" Then
x(Asc(S) - 65 + 1) = x(Asc(S) - 65 + 1) + 1
End If
Next i
For i=1 To L
Text2=text2 & Chr(64+i) & “=” & x(i) & “ “
If I Mod 7=0 then Text2=text2 & chr(13)+chr(10)
Next i
End Sub
3.設(shè)學(xué)生成績(jī)的平均分已在Mark(1)至Mark(10)中,學(xué)生姓名在name(1)至name(10)中。
Private Sub Command1_click()
Dim I%,J%,T%,S$
For i=1 To 9
For j=i+1 To 10
If Mark(i)<MARK(J) Then T=Mark(i):Mark(i)=Mark(j):Mark(j)=T
S=name(i):name(i)=name(j):name(j)=S
Next J
Next i
For i=1 To 10
Print Name(i),Mark(i)
Next i
End Sub