MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply TodayIf *p* is the perimeter of a right angle triangle with integral length sides, { *a*, *b*, *c* }, there are exactly three solutions for *p* = 120.

{[20,48,52], [24,45,51], [30,40,50]}

Given any value of *p*, return a cell array whose elements are the sorted side lengths of a possible right triangle whose perimeter is *p*. Furthermore, the elements of the output should be sorted by their shortest side length.

31 correct solutions
34 incorrect solutions

Last solution submitted on Sep 04, 2014

1 Comment