用vb编程:输出100-200之间的所有素数,并将这些数求和,求出结果存入所给变量su

日期:2015-12-09 11:37:39 人气:1

用vb编程:输出100-200之间的所有素数,并将这些数求和,求出结果存入所给变量su

Private Sub Command1_Click() Dim i As Integer, j As Integer, k As Integer, su As Integer For i = 100 To 300 For j = 2 To Int(Sqr(i)) If i Mod j = 0 Then Exit For End If Next If j > Int(Sqr(i)) Then
    A+
热门评论