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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!