1个回答
展开全部
Private Sub Command1_Click()
Dim a() As Integer
For i = 100 To 300
flg = True
For j = 2 To i - 1
If i Mod j = 0 Then flg = False
Next j
If flg = True Then
n = n + 1
ReDim Preserve a(n)
a(n) = i
End If
Next i
For i = 1 To n
Print a(i);
If i Mod 5 = 0 Then Print
Next i
End Sub
Dim a() As Integer
For i = 100 To 300
flg = True
For j = 2 To i - 1
If i Mod j = 0 Then flg = False
Next j
If flg = True Then
n = n + 1
ReDim Preserve a(n)
a(n) = i
End If
Next i
For i = 1 To n
Print a(i);
If i Mod 5 = 0 Then Print
Next i
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询