Looping Questions
Looping Questions
1 1 1 1 1 2
1 2 3 2 4 3 2 2 2
1 2 3 4 5 3 6 9 3 3 3 4
1 2 3 4 8 12 16 5 4 4 4
1
0 1 1 * 2 * 3 * 4 * 17 * 18 * 18 * 20
1 0 3*2 5 * 6 * 7 * 14 * 15 * 16
0 1 0 4*5*6 8 * 9 * 12 * 13
1 0 1 0 10 * 9 * 8 * 7 10 * 11
30.
A Pythagorean triplet is a set of three integers a, b, and c such that a2 + b2 =c2. Given a limit,
generate all Pythagorean triplets with a value smaller than the limit.
Input: limit = 20
Output:
3 4 5
8 6 10
5 12 13
15 8 17
12 16 20