Solving 'Easy' Triangle Problem

Have the math working, but struggling through all of the error checks.