/* Given three numbers, x, y and z, * determine whether they are the edges of a right angled triangle. * Notice the largest side of the triangle might not be the last one * passed to the function. All numbers will be integers (whole numbers). */ // two soltions, one nice solution...One longer solution that led to the // nice solution. bool rightTriangle(int x, int y, int z) { std::vector valid = {x,y,z}; for(int i=0;iy){ if(x>z){ sideOne = y; sideTwo = z; largest = x; } } else if(y>z){ sideTwo = z; largest = y; } return (largest*largest) == ((sideOne*sideOne) + (sideTwo*sideTwo)); */ }