#1




Whether given 3 numbers form the side of a trianglepls help the logic behind how to find whether given 3 numbers form the side of a triangle....kindly explain the logic....


#2




Re: pls help..how to find whether given numbers form side of a triangleQuote:
I think the problem statement might be something like: Given three positive integers, how can you know whether it is possible to make a triangle with sides whose lengths are equal to those three values? (Or something like that.) If this is not the problem, then tell us what it is. If this is the problem (or something like that), then consider that each side of a triangle must be less than the sum of the other two sides. If you accept that truth, then you can eliminate any set of three positive integers for which one value is greater than or equal to the sum of the other two, so you can test the following three expressions a >= b+c b >= a+c c >= a+b If any one of them is true, then the three numbers can't be lengths of the sides of a triangle, right? Now if all of those are false (for a given set of positive integers a, b, c), can you say for sure that it is possible to make a triangle whose sides are those values? (This is a geometry question, not a programming question.) If you can say that, then just create a program that uses tests for those three expressions. (Or their logical inverses.) Regards, Dave Last edited by davekw7x : 30Jan2008 at 09:53.

#3




Re: pls help..how to find whether given numbers form side of a trianglehey thanks for that.....i was able to solve it....

«
Previous Thread

Next Thread
»
Thread Tools  Search this Thread 
Rate This Thread  



Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
loop to find only odd numbers  Avalanche  C++ Forum  3  05Aug2007 13:02 
Help on homework!  kemmal  C Programming Language  1  06Nov2006 12:22 
Linear Search  eccoflame  C Programming Language  3  19Apr2005 08:36 
Program that will find the first 4 perfect numbers?????  bicknell83  C Programming Language  3  30Mar2005 02:35 
Network Sites: GIDNetwork · GIDApp · GIDBlog · Learning Journal by J de Silva, The
All times are GMT 6. The time now is 14:43.