回覆列表
  • 1 # 筱釧丶

    顯示在 ListBox 中

    Private Sub Command1_Click()

    Dim i, j, k As Integer

    Dim a As String

    Dim b As Boolean

    k = 0

    For i = 2 To 100

    b = False

    For j = 2 To i - 1

    If i Mod j = 0 Then

    b = True

    Exit For

    End If

    Next j

    If Not b Then

    k = k + 1

    s = s & Str(i)

    If k = 6 Then

    List1.AddItem s

    s = ""

    k = 0

    End If

    End If

    Next i

    If s <> "" Then List1.AddItem s

    End Sub

  • 中秋節和大豐收的關聯?
  • 什麼是聚類分析?聚類演算法有哪幾種?