【正文】
Chr(13) amp。 Next i Print For i = 1 To 20 If a(i) = 90 Then score(1) = score(1) + 1 ElseIf a(i) = 80 Then score(2) = score(2) + 1 ElseIf a(i) = 70 Then score(3) = score(3) + 1 ElseIf a(i) = 60 Then score(4) = score(4) + 1 Else score(5) = score(5) + 1 End If Next i For i = 1 To 5 Print score(i) Next iEnd SubP126 練習(xí)五一. 對: 1,2,3, 4,6,7,9錯: 5,8二. 1,D 2,C 3,A 4,B 5,D 6,? 7,? 8,D三.1,1) a() As Single, m As Integer2) j = i + 1 To m3) a(i) a(j)4) Call pf(b, n)2,1) Int(Rnd * 21) + 302) For j = i + 1 To 103) Call Swap(a(i), a(j))4) a(10)3,1) If Isprime(i) = True And Isprime(x i) = True Then2) Isprime = True3) If x Mod i = 0 Then四,1. 9 762, 4 93, 6 4 6 48 36 424, 26 9五、Private Sub Command1_Click()Dim a() As Single, n As Integer, s As SingleDim v As Single, i As Integern = InputBox(請輸入n的值)ReDim a(n)For i = 1 To n a(i) = InputBox()Next iv = f(a, n)For i = 1 To n s = s + (a(i) v) ^ 2Next is = Sqr(s) / nPrint sEnd SubPrivate Function fsum(a() As Single, n As Integer) As SingleDim i As IntegerFor i = 1 To n fsum = fsum + a(i)Next iEnd FunctionPrivate Sub ff(x() As Single, m As Byte, n As Byte, xmax As Single, ki As Byte, kj As Byte)Dim i As Integer, j As Integerxmax = x(1, 1): ki = 1: kj = 1For i = 1 To m For j = 1 To n If x(i, j) xmax Then xmax = x(i, j): ki = i: kj = j Next jNext iEnd SubP153 練習(xí)六一, 對: 5 錯: 1,2,3,4,6,7,8,9, 10二.1,D 2,D 3,題目有錯(應(yīng)改為True)A 4,C 5,C6,D 7,C 8,D 9,與2重復(fù) 10,C11,B 12,B 13,B 14,B 三.1. (1)Dim a As Integer, b As Integer(2)Str(n) + Str(n_error)(3)KeyPress(4)KeyAscii 13(5) = True 2. (1)1 To 2*i–1 (2) = True (3) = False四.1. GFEDCBA2. 小,你好! 小李,你好!3.