English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

1) accept the coordinates of 3 point.
2) check whether these points from a triangle or not.
3) if the given 3 points from a triangle find it's area.
4)you should write a function that calculate the distance between 2 points and calculate the slope of the line connects these 2 points.
5) write a functionto find the area of a triangle using the formula:(S(S-A)(S-B)(S-C))^.5 .
where A,B,C are the triangle sides
and S=(A+B+C)|2

2006-11-25 01:31:00 · 1 answers · asked by a7med_h_87 1 in Computers & Internet Programming & Design

1 answers

Of three points, A,B,C
Check the slope of A-B, B-C, A-C. If any of the slopes are the same, you have parallel lines and thus no triangle. So, to do (2), do (4) first.
If you know the distance between A-B, B-C, A-C, you can calculate the area with the formula, so (5) also depends on (4).

You write your own code. yA isn't a site to do your homework, since if you don't do it yourself, you don't pass the class!

2006-11-25 02:52:04 · answer #1 · answered by WickedSmaht 3 · 0 0

fedest.com, questions and answers