Sharp EL-5230 Calculator User Manual


 
89
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.
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
S = T (T – A) (T – B) (T – C)
T = —————
A + B + C
2
A
B
C
S
Chapter 8: Application Examples