Triangle program...Help please!

I am a new programmer and this is a pretty difficult code for me as I dont have any resources. I need to write a program that reads three edges of a traingle and determines whether the input is valid. It is valid if the sum of any two edges is greater than the 3rd edge. Can someone kinda help me out, I dont know where to even get started. Some sample runs I found look like this

Enter three edges: 1 2.5 1
Can edges 1, 2.5 and 1 form a triangle? false



Enter three edges: 2.5 2 1
Can edges 2.5, 2, and 1 form a triangle? true




Thanks for any help!
You don't need more than one thread about this...
who voted you the forum police?
who voted you the forum police?


clever come back #1.

I reply:

jkretzer said: I am a new programmer and this is a pretty difficult code for me as I dont have any resources


clever come back #2.

The same person who hands out common sense.

clever come back #3.

You may know him as Allah

clever come back #4.

Herp Derp.

clever come back #5.

http://www.youtube.com/watch?v=FMEe7JqBgvg

clever come back #6.

Your mistaken I'm the troll patrol

clever come back #7.

Lern to cod^e nOOb.

clever come back #8

http://cplusplus.com/forum/articles/1295/

[not so] clever come back #9.

No one likes you.

EDIT: troll patrol. That may be the best thing I came up with all day :p
Last edited on
If the greater length side - the least length side < the remaining length side then true else false.
Try writing some code to reflect this logic....it may produce the desired result.
Topic archived. No new replies allowed.