well , to determine if u can create a triangle to begin with u need to check that 2 of the sides added together don't equal less than the largest side

this could be a simple if chain


...