Problem Solving: Exhaustive Search Simulation

In this lesson, we will practice the nested loops by solving a few problems. Let’s look at the first problem which is about Pythagorean Triples.

Pythagorean Triples

A Pythagorean triple is a set of three positive integers that satisfy the equation, a2+b2=c2a^2 + b^2 = c^2.

Problem statement

Print all Pythagorean triples a, b, c less than 1000. a2+b2=c2a^2 + b^2 = c^2.

Get hands-on with 1200+ tech skills courses.