两道vb题,,谢谢
2个回答
展开全部
Dim str As String = ""
Dim n As Integer, sum As Integer = 1, i, j As Integer
For i = 10 To 20
For j = 2 To i - 1
If i Mod j = 0 Then Exit For
Next j
If j > i - 1 Then
sum = sum * i
str = str & i & " "
End If
Next i
TextBox1.Text = str & vbCrLf & " 以上素数的积是 " & sum
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询