Discuss the below:
Q: A right triangle can have sides whose lengths are all integers. The set of these integer values for the lengths of the sides of a right triangle is called a Pythagorean triple. Note that sum of the squares of two of the sides must be equal to square of the hypotenuse. Write an application in C++ to find all of the triples for values of the sides and hypotenuse less than 500. Use a collection of nested for loops that try all possibilities.