Sharp EL-5230, EL-5250 operation manual The Heron Formula, A + B + C T =

Models: EL-5230 EL-5250

1 132
Download 132 pages 22.67 Kb
Page 91
Image 91
The Heron Formula

The Heron Formula

Obtaining the area S of triangle with side lengths of A, B and C using the Heron Formula which is true for any plane triangle.

1.Press b 2 1 0 to open a window for creating a NEW program.

2.Type HERON for the program title then press e.

A NEW program called ‘HERON’ will be created.

3.Enter the program as follows.

Chapter 8: Application Examples

AB

S

C

S = T (T – A) (T – B) (T – C)

A + B + C T = —————

2

Program code

Key operations

Label START

i 6 @ a START ;

 

e

 

 

Print”SIDE LENGTHS

i 1 @ a SIDE s

 

LENGTHS ; e

 

 

Input A

i 2 ; A e

 

 

Input B

i 2 ; B e

 

 

Input C

i 2 ; C e

 

 

If (A+B)<=C Goto ERROR

i 8 ( ; A + ; B

 

) i E ; C ; s

 

i 9 @ a ERROR ;

 

e

If (B+C)<=A Goto ERROR i 8 ( ; B + ; C

)i E ; A ; s i 9 @ a ERROR ; e

If (C+A)<=B Goto ERROR i 8 ( ; C + ; A

)i E ; B ; s i 9 @ a ERROR ; e

T=(A+B+C)©2

; T ; = ( ; A +

 

; B + ; C ) z 2

 

e

 

 

89

Page 91
Image 91
Sharp EL-5230, EL-5250 operation manual The Heron Formula, A + B + C T =