(41C) Area of Triangle (SSS)

11112018, 04:25 PM
(This post was last modified: 11112018 06:08 PM by Dieter.)
Post: #7




RE: (41C) Area of Triangle (SSS)
(11112018 12:23 PM)Gamo Wrote: I have test by deleted the LBL 02 and changed GTO 02 to GTO 03 so it work ok now. It works exactly the same as before, just with less steps. ;) But what about the input order now? How do A, B and C have to be entered so that the program always returns correct results? For rightangled triangles C must be the largest side, while on the other hand for the isosceles example C is the smallest side. ?!? You should assume that the user does not know which kind of triangle enters. After all, that's what the program is supposed to display. So the only rule can be something like "enter sides in ascending order" (or similar). But this requires a modification of the program. Edit: here is a possible solution. Enter the three sides in ascending order, i.e. A≤B≤C. I tried to preserve as much of your original program as possible. The output routine has been changed, you may modify it according to your likings. The program now ends in one common endpoint for all cases at LBL 00 so that you can restart it with a simple [R/S]. Code: LBL "SSS" Dieter 

« Next Oldest  Next Newest »

Messages In This Thread 
(41C) Area of Triangle (SSS)  Gamo  11102018, 12:20 PM
RE: (41C) Area of Triangle (SSS)  Albert Chan  11102018, 03:22 PM
RE: (41C) Area of Triangle (SSS)  Dieter  11102018, 08:53 PM
RE: (41C) Area of Triangle (SSS)  Albert Chan  11122018, 02:55 PM
RE: (41C) Area of Triangle (SSS)  Dieter  11122018, 08:28 PM
RE: (41C) Area of Triangle (SSS)  Albert Chan  11122018, 10:33 PM
RE: (41C) Area of Triangle (SSS)  Gamo  11112018, 05:04 AM
RE: (41C) Area of Triangle (SSS)  Dieter  11112018, 07:53 AM
RE: (41C) Area of Triangle (SSS)  Gamo  11112018, 12:23 PM
RE: (41C) Area of Triangle (SSS)  Dieter  11112018 04:25 PM
RE: (41C) Area of Triangle (SSS)  Albert Chan  11122018, 01:32 AM
RE: (41C) Area of Triangle (SSS)  Albert Chan  11162018, 03:33 AM
RE: (41C) Area of Triangle (SSS)  Albert Chan  12042019, 03:03 PM

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