怎样才能用最简单的方式找出在一定范围内的质数呢?比如将12到112的质数打印在面板上?
Dim n As LongDim m As LongFor n = min_sum To max_sum For m = 2 To Int(Sqr(n)) If n / m = Int(n / m) Then Exit For ElseIf m = Int(Sqr(n)) Then List1.AddItem (n) End If Next mNext n