Question: Write a program that prints all sets of six positive integers a1, a2, a3, a4, a5 and a6 such that a1
Write a program that prints all sets of six positive integers a1, a2, a3, a4, a5 and a6 such that a1 <= a2 <= a3 <= 20 and a1 <= a4 <= a5 <= a6 <= 20 and the sum of the squares of a1, a2 and a3 equals sum of the squares of a4, a5 and a6. [ Hint : Generate all possible sums of three squares and use a sorting procedure to find duplicates ]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
