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

This is an assignment given to me, to write a program to take 3 non-zero integers and display they are the sides of triangles..
Plz help me out

2007-09-16 03:18:01 · 4 answers · asked by Anonymous in Science & Mathematics Mathematics

4 answers

check if every possible pair of two numbers is greater than the remaining one
its like
a,b,c
a+b>c
a+c>b
b+c>a

i cant say how can you get it into programming.....
this is all i know!

2007-09-16 03:32:15 · answer #1 · answered by PRIYADARSHINII 2 · 0 0

Take the longest side. Can the other two "sides" connect with both ends of the longest?

Take the longest side, call it A.
Call the other sides B and C (the order does not matter).
is A longer than B+C?

If it is, what happens to the triangle?

2007-09-16 03:36:19 · answer #2 · answered by Raymond 7 · 0 0

You want me to write a program for you? Consultant's fees are upwards of $50 an hour... And you aren't likely to get a consultant for less than a month...four 40-hour weeks.

Hint... Figure out how you would do it manually. Then, in whatever programming language you're using, tell the computer to do it that way.

If you don't know how to do it manually, refer to any geometry or trigonometry text.

If you don't know how to write it in whatever programming language you're supposed to use, consult your reference manual.

2007-09-16 03:35:13 · answer #3 · answered by gugliamo00 7 · 0 0

The sum of the smallest 2 must be > the largest.
--Think-- about it. Don't you remember anything from Geometry?

Doug

2007-09-16 03:23:19 · answer #4 · answered by doug_donaghue 7 · 0 0

fedest.com, questions and answers