VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   4395
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   7440
   LinkTopic       =   "Form1"
   ScaleHeight     =   4395
   ScaleWidth      =   7440
   StartUpPosition =   3  '系統預設值
   Begin VB.CommandButton Command1 
      Caption         =   "辨識"
      BeginProperty Font 
         Name            =   "微軟正黑體"
         Size            =   15.75
         Charset         =   136
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1215
      Left            =   4440
      TabIndex        =   7
      Top             =   2400
      Width           =   2175
   End
   Begin VB.TextBox Text3 
      BeginProperty Font 
         Name            =   "微軟正黑體"
         Size            =   15.75
         Charset         =   136
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   975
      Left            =   6240
      TabIndex        =   6
      Top             =   240
      Width           =   975
   End
   Begin VB.TextBox Text2 
      BeginProperty Font 
         Name            =   "微軟正黑體"
         Size            =   15.75
         Charset         =   136
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   975
      Left            =   4680
      TabIndex        =   4
      Top             =   240
      Width           =   975
   End
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "微軟正黑體"
         Size            =   15.75
         Charset         =   136
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   975
      Left            =   3000
      TabIndex        =   2
      Top             =   240
      Width           =   975
   End
   Begin VB.Label Label6 
      Appearance      =   0  '平面
      BackColor       =   &H80000005&
      BorderStyle     =   1  '單線固定
      BeginProperty Font 
         Name            =   "微軟正黑體"
         Size            =   15.75
         Charset         =   136
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000008&
      Height          =   855
      Left            =   1560
      TabIndex        =   9
      Top             =   2400
      Width           =   1815
   End
   Begin VB.Label Label5 
      Caption         =   "結果="
      BeginProperty Font 
         Name            =   "微軟正黑體"
         Size            =   15.75
         Charset         =   136
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   360
      TabIndex        =   8
      Top             =   2400
      Width           =   1575
   End
   Begin VB.Label Label4 
      Caption         =   "c="
      BeginProperty Font 
         Name            =   "微軟正黑體"
         Size            =   15.75
         Charset         =   136
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   5760
      TabIndex        =   5
      Top             =   240
      Width           =   855
   End
   Begin VB.Label Label3 
      Caption         =   "b="
      BeginProperty Font 
         Name            =   "微軟正黑體"
         Size            =   15.75
         Charset         =   136
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   4080
      TabIndex        =   3
      Top             =   240
      Width           =   855
   End
   Begin VB.Label Label2 
      Caption         =   "a="
      BeginProperty Font 
         Name            =   "微軟正黑體"
         Size            =   15.75
         Charset         =   136
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   2520
      TabIndex        =   1
      Top             =   240
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   "三角形邊長a、b、c，辨識是銳角、直角、鈍角三角形"
      BeginProperty Font 
         Name            =   "微軟正黑體"
         Size            =   15.75
         Charset         =   136
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1815
      Left            =   120
      TabIndex        =   0
      Top             =   240
      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()
    a = Val(Text1.Text)
    b = Val(Text2.Text)
    c = Val(Text3.Text)
    
    d = a ^ 2
    e = b ^ 2
    f = c ^ 2
    
     
    If a > b Then
        If a > c Then
            If d = e + f Then Label6.Caption = "直角三角形"
            If d < e + f Then Label6.Caption = "銳角三角形"
            If d > e + f Then Label6.Caption = "鈍角三角形"
        Else
            If f = d + e Then Label6.Caption = "直角三角形"
            If f < d + e Then Label6.Caption = "銳角三角形"
            If f > d + e Then Label6.Caption = "鈍角三角形"
        End If
    Else
        If b > c Then
            If e = d + f Then Label6.Caption = "直角三角形"
            If e < d + f Then Label6.Caption = "銳角三角形"
            If e > d + f Then Label6.Caption = "鈍角三角形"
        Else
            If f = d + e Then Label6.Caption = "直角三角形"
            If f < d + e Then Label6.Caption = "銳角三角形"
            If f > d + e Then Label6.Caption = "鈍角三角形"
        End If
    End If
    
   
    If a = b And c > a Then
        If f < d + e Then
            Label6.Caption = "銳角三角形"
        Else
            Label6.Caption = "鈍角三角形"
        End If
    End If
    
    If a = b And c < a Then
        Label6.Caption = "銳角三角形"
    End If
    
    If a = c And b > a Then
        If e < d + f Then
            Label6.Caption = "銳角三角形"
        Else
            Label6.Caption = "鈍角三角形"
        End If
    End If
    
    If a = c And b < a Then
        Label6.Caption = "銳角三角形"
    End If
    
    If c = b And a > c Then
        If d < f + e Then
            Label6.Caption = "銳角三角形"
        Else
            Label6.Caption = "鈍角三角形"
        End If
    End If
    
    If c = b And a < b Then
        Label6.Caption = "銳角三角形"
    End If
    
    
    If a = 0 Or b = 0 Or c = 0 Then
        Label6.Caption = "不是三角形"
    End If
        
    End Sub
    


