18. Is It a Triangle?
Foundation1000 ms256 MBSolved by 0%
Read three side lengths and print Yes if they can form a triangle,
or No if they cannot.
Three lengths form a triangle only when the sum of every pair is strictly greater than the third side. Equal is not enough — three sides of 1, 2 and 3 collapse into a straight line, not a triangle.
Constraints - `1 ≤ a, b, c ≤ 1000000000`
Input
A single line containing three integers — the side lengths — separated by spaces.
Output
Print exactly one word: Yes or No.
Input3 4 5
OutputYes
Noteis a right-angled triangle
Input1 2 3
OutputNo
Notehas two sides summing to exactly the third, which is a straight line rather than a triangle
Hint 1Approach
Hint 2Approach
Hint 3Pseudocode
Hint 4Full solution