VB中求素數

Private Sub Command1_Click() n = Val(Text2.Text) For i = 2 To n Dim flag As Boolean flag = True For j = 2 To i - 1 If i Mod j = 0 Then flag = False Exit For End If Next j If flag Then Text1.Text = Tex
相關文章
相關標籤/搜索