Private Sub Command1_Click()
Dim fz As Integer, fm As Integer, js As Integer
Randomize
Do
fz = Int(90 * Rnd) + 10
fm = Int(90 * Rnd) + 10
If fz < fm Then
If v_alidate(fz, fm) Then
Text1 = Text1 & fz & "/" & fm & " "
js = js + 1
If js Mod 5 = 0 Then Text1 = Text & vbrlf
End If
End If
Loop Until js <= 20
End Sub
Private Function validate(fz As Integer, fm As Integer) As Boolean
Dim n As Integer, i As Integer, s As String
For n = 2 To fz
If fz Mod n = 0 And fm Mod n = 0 Then Exit For
Next n
s = fz + fm
For i = 1 To Len(s) - 1
For n = i + 1 To Len(s)
If Mid(s, i, 1) = Mid(s, n, 1) Then
Exit Function
End If
Next n
Next i
validate = ture
End Function
一道计算机二级的改错问题
答案:1 悬赏:0 手机版
解决时间 2021-08-13 02:53
- 提问者网友:戎马万世
- 2021-08-12 22:33
最佳答案
- 五星知识达人网友:慢性怪人
- 2021-08-12 22:45
不影响,只要你没有把它删了,影响程序运行。 一样可以得分!! 好运!!
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯