鸭子tv国产极品在线观看_成人69视频在线播放_91精品免费在线观看_亚洲AT永久偷窥无码精品_国产精品自产拍在线观看涩浪潮久

江蘇省高校計(jì)算機(jī)等級考試命題研究院 江蘇省高校計(jì)算機(jī)等級考試輔導(dǎo)
江蘇二級vb2010春上機(jī)試題

改錯(cuò)題:

Option Explicit
Private Sub Command1_Click()
Dim N As Integer, K As Long, St As String
For N = 500 To 800
    K = N ^ 2
    If Validate(N) And Validate(K) Then
        St = N & "^2=" & K
        List1.AddItem St
    End If
Next N
End Sub
Private Function Validate(ByVal N As Long) As Boolean '錯(cuò)誤點(diǎn)1byval
Dim P As String, i As Integer, a() As Integer, j As Integer
P = CStr(N) '錯(cuò)誤點(diǎn)2str(n)
ReDim a(Len(P))
For i = 1 To Len(P)
    a(i) = Mid(P, i, 1)
Next i
For i = 1 To UBound(a) - 1
    For j = i + 1 To UBound(a)
        If a(i) = a(j) Then Exit Function     '錯(cuò)誤點(diǎn)3Exit For
    Next
Next
Validate = True
End Function