The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function

 (41C) Area of Triangle (SSS)
11-10-2018, 12:20 PM (This post was last modified: 11-11-2018 12:18 PM by Gamo.)
Post: #1
 Gamo Senior Member Posts: 751 Joined: Dec 2016
(41C) Area of Triangle (SSS)
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:
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
 « Next Oldest | Next Newest »

 Messages In This Thread (41C) Area of Triangle (SSS) - Gamo - 11-10-2018 12:20 PM RE: (41C) Area of Triangle (SSS) - Albert Chan - 11-10-2018, 03:22 PM RE: (41C) Area of Triangle (SSS) - Dieter - 11-10-2018, 08:53 PM RE: (41C) Area of Triangle (SSS) - Albert Chan - 11-12-2018, 02:55 PM RE: (41C) Area of Triangle (SSS) - Dieter - 11-12-2018, 08:28 PM RE: (41C) Area of Triangle (SSS) - Albert Chan - 11-12-2018, 10:33 PM RE: (41C) Area of Triangle (SSS) - Gamo - 11-11-2018, 05:04 AM RE: (41C) Area of Triangle (SSS) - Dieter - 11-11-2018, 07:53 AM RE: (41C) Area of Triangle (SSS) - Gamo - 11-11-2018, 12:23 PM RE: (41C) Area of Triangle (SSS) - Dieter - 11-11-2018, 04:25 PM RE: (41C) Area of Triangle (SSS) - Albert Chan - 11-12-2018, 01:32 AM RE: (41C) Area of Triangle (SSS) - Albert Chan - 11-16-2018, 03:33 AM RE: (41C) Area of Triangle (SSS) - Albert Chan - 12-04-2019, 03:03 PM

User(s) browsing this thread: 1 Guest(s)