Skip to content

This is a simple program build by C++ to check if the sticks could make a valid tringle.

Notifications You must be signed in to change notification settings

Khubayan/couldTheSticksMakeTriangle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

couldTheSticksMakeTriangle

This is a simple program build by C++ to check if the sticks could make a valid tringle.


A triangle is valid if sum of its two sides is greater than the third side. If three sides are a, b and c, then three conditions should be met.
1.a + b > c
2.a + c > b
3.b + c > a

Preview

  • First input value represent how much the test will run.
  • Next input is how length each stick will check the validity to build a triangle (each test need three times input).
  • Output for each test will return between "Yes" if they are valid or "No" if they are invalid.
  • Done.

About

This is a simple program build by C++ to check if the sticks could make a valid tringle.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages