11-10-2018, 12:20 PM
Program to calculate the "Area of Triangle" with "given 3 sides"
To find the Area this program used the Heron's formula.
This program tell what kind of Triangle then give answer of the area.
Type of Triangle.
1. Equilateral - All sides is the same lengths.
2. Scalene - All sides of different lengths.
3. Isosceles - Two sides of equal length.
4. Right Angle - One angle is a right angle.
For
A ≤ B ≤ C
Example: Assign program to [X<>Y]
[X<>Y] A 2 [R/S] B 3 [R/S] C 4 [R/S] --> SCALENE [R/S] 2.9047
[X<>Y] A 8 [R/S] B 8 [R/S] C 3 [R/S] --> ISOSCELES [R/S] 11.7872
[X<>Y] A 3 [R/S] B 4 [R/S] C 5 [R/S] --> RIGHT ANGLE [R/S] 6
[X<>Y] A 5 [R/S] B 5 [R/S] C 5 [R/S] --> EQUILATERAL [R/S] 10.8253
------------------------------------------
Program:
Assign LBL SSS to [X<>Y]
ASN ALPHA SSS ALPHA [X<>Y]
Remark:
For two sides of equal length (Isosceles) must start two same sides
at A and B otherwise result will be (Scalene)
Gamo
To find the Area this program used the Heron's formula.
This program tell what kind of Triangle then give answer of the area.
Type of Triangle.
1. Equilateral - All sides is the same lengths.
2. Scalene - All sides of different lengths.
3. Isosceles - Two sides of equal length.
4. Right Angle - One angle is a right angle.
For
A ≤ B ≤ C
Example: Assign program to [X<>Y]
[X<>Y] A 2 [R/S] B 3 [R/S] C 4 [R/S] --> SCALENE [R/S] 2.9047
[X<>Y] A 8 [R/S] B 8 [R/S] C 3 [R/S] --> ISOSCELES [R/S] 11.7872
[X<>Y] A 3 [R/S] B 4 [R/S] C 5 [R/S] --> RIGHT ANGLE [R/S] 6
[X<>Y] A 5 [R/S] B 5 [R/S] C 5 [R/S] --> EQUILATERAL [R/S] 10.8253
------------------------------------------
Program:
Code:
LBL "SSS"
"A"
PROMPT
STO 01
"B"
PROMPT
STO 02
"C"
PROMPT
STO 03
RCL 02
+
RCL 01
+
2
÷
STO 04
ENTER
RCL 04
RCL 01
-
RCL 04
RCL 02
-
x
RCL 04
RCL 03
-
x
x
√x
STO 04
RCL 01
X^2
RCL 02
X^2
+
RCL 03
X^2
X=Y
GTO 01
RCL 01
RCL 02
X=Y
GTO 03
"SCALENE"
PROMPT
RCL 04
RTN
--------------------------
LBL 01
"RIGHT ANGLE"
PROMPT
RCL 04
RTN
--------------------------
LBL 03
RCL 02
RCL 03
X=Y
GTO 04
"ISOSCELES"
PROMPT
RCL 4
RTN
-------------------------
LBL 04
"EQUILATERAL"
PROMPT
RCL 04
RTN
Assign LBL SSS to [X<>Y]
ASN ALPHA SSS ALPHA [X<>Y]
Remark:
For two sides of equal length (Isosceles) must start two same sides
at A and B otherwise result will be (Scalene)
Gamo