VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   4305
   ClientLeft      =   120
   ClientTop       =   450
   ClientWidth     =   5865
   LinkTopic       =   "Form1"
   ScaleHeight     =   4305
   ScaleWidth      =   5865
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "计算"
      Height          =   615
      Left            =   2040
      TabIndex        =   3
      Top             =   2880
      Width           =   1455
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   2160
      TabIndex        =   1
      Top             =   1320
      Width           =   1935
   End
   Begin VB.Label Label2 
      Caption         =   "计算结果："
      Height          =   375
      Left            =   960
      TabIndex        =   2
      Top             =   1320
      Width           =   1095
   End
   Begin VB.Label Label1 
      Caption         =   "计算1 + 1/2 + 1/3 + 1/4 + ...... + 1/100的值。"
      Height          =   375
      Left            =   600
      TabIndex        =   0
      Top             =   600
      Width           =   4335
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'注意：不要删除注释；完善程序时删除下划线
'要求： 1、请将命令按钮上显示的文本"command1"改为"计算"
'       2、完善程序的填空，并调试运行和保存

Private Sub Command1_click()
Dim a As Double
Dim b As Double
Dim i As Integer
a = 0 '初始化
For i = 1 To 100
b = 1 / i
a = a + b
Next i
Text1.Text = a
End Sub

