早教吧作业答案频道 -->其他-->
请问2017和87960787分别是质数还是合数?
题目详情
请问2017和87960787分别是质数还是合数?
▼优质解答
答案和解析
我编写了一个分解质因数的程序,用Visual Basic编的.
证实2017是质数,87960787也是质数.
不信的话,我给你源代码看.
VERSION 5.00
Begin VB.Form 分解质因数
Caption = "分解质因数"
ClientHeight = 3150
ClientLeft = 60
ClientTop = 390
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3150
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox b
Height = 1935
Left = 240
Locked = -1 'True
MultiLine = -1 'True
TabIndex = 3
Top = 1080
Width = 4095
End
Begin VB.CommandButton Command1
Appearance = 0 'Flat
Caption = "确定"
Height = 375
Left = 3240
TabIndex = 2
Top = 360
Width = 975
End
Begin VB.TextBox a
Height = 270
Left = 240
MaxLength = 15
TabIndex = 1
Top = 360
Width = 1695
End
Begin VB.Label Label1
Caption = "结果"
Height = 255
Left = 240
TabIndex = 4
Top = 840
Width = 1095
End
Begin VB.Label T
Caption = "请输入正整数(3-999999999999999)"
Height = 255
Left = 240
TabIndex = 0
Top = 120
Width = 3615
End
End
Attribute VB_Name = "分解质因数"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
a = Int(Val(a)):d = a
If a < 3 Or a > 999999999999999# Then b = "你的输入不合法!":a = "":GoTo 2
c = 2
While c
证实2017是质数,87960787也是质数.
不信的话,我给你源代码看.
VERSION 5.00
Begin VB.Form 分解质因数
Caption = "分解质因数"
ClientHeight = 3150
ClientLeft = 60
ClientTop = 390
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3150
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox b
Height = 1935
Left = 240
Locked = -1 'True
MultiLine = -1 'True
TabIndex = 3
Top = 1080
Width = 4095
End
Begin VB.CommandButton Command1
Appearance = 0 'Flat
Caption = "确定"
Height = 375
Left = 3240
TabIndex = 2
Top = 360
Width = 975
End
Begin VB.TextBox a
Height = 270
Left = 240
MaxLength = 15
TabIndex = 1
Top = 360
Width = 1695
End
Begin VB.Label Label1
Caption = "结果"
Height = 255
Left = 240
TabIndex = 4
Top = 840
Width = 1095
End
Begin VB.Label T
Caption = "请输入正整数(3-999999999999999)"
Height = 255
Left = 240
TabIndex = 0
Top = 120
Width = 3615
End
End
Attribute VB_Name = "分解质因数"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
a = Int(Val(a)):d = a
If a < 3 Or a > 999999999999999# Then b = "你的输入不合法!":a = "":GoTo 2
c = 2
While c
看了 请问2017和8796078...的网友还看了以下:
鸡蛋布丁适合8-9个月宝宝吃 2020-03-30 …
急,8.9是整数吗? 2020-05-13 …
求初三英语任务型阅读要30片初中学生做的任务型阅读题型是前面5个是给词填空、6.7.分别是根据所给 2020-05-17 …
1+2+3+4+5+6+7+8+9是等于多少啊? 2020-06-05 …
小华从家去车站,行到全程的8/9是邮局,从车站回家,行到全程的1/3时,超过邮局0.42千米,小华 2020-06-14 …
1kg裸铜制成0.1mm的铜导线,能做多长的?如以下公式如何解析?1KG/(0.1*0.1*0.7 2020-06-25 …
1.计算(-0.25)的十次方×(-2)的二十三次方2.找规律3,7,11,15,19,23,27 2020-07-18 …
72里有9个8列成式子是72除以8=9是对是错?(教孩子做作业呢,请有把握的回答) 2020-07-29 …
什么叫一元一次方程的一般形式?平常遇到的如:3x-8=9是什么形式的? 2020-12-25 …
(dij3•鄂尔多斯)如图中所示是鄂尔多斯市9“风光互补”照明灯,它头“顶”小风扇,肩“扛”光电池板 2021-01-14 …