Need Help!

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 wether 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!
I would start by having the user enter 3 edges, then seeing if any 2 combined are longer then the third, then outputing either true or false based on that.
Last edited on
I'm just not sure how to write that in code? seeing if any 2 combined are longer than the 3rd is really throwing me off
closed account (D80DSL3A)
EDIT: Ignored hints removed.
Last edited on
Would it be possible for someone to throw me a code together please? Thanks in advance!
closed account (D80DSL3A)
OK then... I regret bothering to reply earlier.
This isn't a homework service.
jkretzer wrote:
seeing if any 2 combined are longer than the 3rd is really throwing me off
Well, can you add two numbers together at all? Surely you know how to do that...
Last edited on
Topic archived. No new replies allowed.