📄 哥德.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 4020
ClientLeft = 60
ClientTop = 450
ClientWidth = 5955
LinkTopic = "Form1"
ScaleHeight = 4020
ScaleWidth = 5955
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 855
Left = 3360
TabIndex = 0
Top = 3000
Width = 2175
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 n As Integer, i As Integer, p As Integer, q As Single
Dim pt As Boolean, qt As Boolean
n = InputBox("输入一个大于4的偶数")
p = 2
Do
p = p + 1
q = n - p
i = 2
Do Until (p Mod i = 0) Or (i = p - 1)
i = i + 1
Loop
If p Mod i = 0 Then pt = False Else pt = True
If pt Then
i = 2
Do Until (q Mod i = 0) Or (i = q - 1)
i = i + 1
Loop
If q Mod i = 0 Then qt = False Else qt = True
End If
Loop Until (pt And qt) Or (p = n - 3)
If (pt And qt) Then Print n; "="; p; "+"; q Else Print "找不到这样的素数"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -