📄 绝对素数.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3090
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 615
Left = 2880
TabIndex = 0
Top = 2160
Width = 1455
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim pt As Boolean, qt As Boolean
For i = 10 To 99
pt = False
s = 0
For j = 2 To i - 1
If i Mod j = 0 Then s = s + 1
Next j
If s = 0 Then pt = True
If pt Then
q = (i Mod 10) * 10 + (i \ 10)
t = 0
For k = 2 To q - 1
qt = False
If q Mod k = 0 Then t = t + 1
Next k
If t = 0 Then qt = True
End If
If (pt And qt) Then Print i; "是绝对素数"
Next i
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -