📄 求级数和的子过程.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "求级数和的子过程"
ClientHeight = 3465
ClientLeft = 60
ClientTop = 450
ClientWidth = 4755
LinkTopic = "Form1"
ScaleHeight = 3465
ScaleWidth = 4755
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "清除"
Height = 495
Left = 2880
TabIndex = 5
Top = 1680
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "计算"
Height = 495
Left = 720
TabIndex = 4
Top = 1680
Width = 1095
End
Begin VB.TextBox Text2
Height = 375
Left = 2160
TabIndex = 3
Top = 1080
Width = 975
End
Begin VB.TextBox Text1
Height = 375
Left = 2160
TabIndex = 1
Top = 240
Width = 975
End
Begin VB.Label Label4
BorderStyle = 1 'Fixed Single
Height = 495
Left = 1800
TabIndex = 7
Top = 2640
Width = 2175
End
Begin VB.Label Label3
Caption = "计算的结果"
Height = 375
Left = 360
TabIndex = 6
Top = 2760
Width = 1095
End
Begin VB.Label Label2
Caption = "输入计算精度eps"
Height = 375
Left = 120
TabIndex = 2
Top = 1080
Width = 1575
End
Begin VB.Label Label1
Caption = "输入x的值"
Height = 375
Left = 480
TabIndex = 0
Top = 360
Width = 975
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Sub pro1(sum#, x!, eps#)
Dim i%, t#
sum = 0
i = 1
t = x
Do While (Abs(t) >= eps)
sum = sum + t
i = i + 1
t = t * x / i
Loop
End Sub
Private Sub Command1_Click()
Dim s#, y!, e#
y = Text1.Text
e = Text2.Text
pro1 s, y, e
Label4.Caption = s
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Label4.Caption = ""
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -