VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Public Function area(x!, y!, z!) As Single
  Dim c!
  c = 1 / 2 * (x + y + z)
  area = Sqr(c * (c - x) * (c - y) * (c - z))
End Function

Private Sub Form_Click()
   Dim a!, b!, c!, d!, e!, f!, g!, s1!, s2!, s3!
   a = InputBox("输入a"): b = InputBox("输入b"): c = InputBox("输入c")
   d = InputBox("输入d"): e = InputBox("输入e"): f = InputBox("输入f")
   g = InputBox("输入g")
   s1 = area(a, b, c)
   s2 = area(c, d, e)
   s3 = area(e, f, g)
   Print s1 + s2 + s3
End Sub

