
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Page 1 of 1
Write a Java program to find the ages of three children such that the square of the sum of the ages is the same as the product of the three ages. That is, for ages a 0 , a 1 , and a (^2)
(a 0 + a 1 + a 2 ) 2 = a 0 × a 1 × a (^2)
Display all possible unique combinations for ages below 20 (this excludes the same ages but in a different order). Finding the unique ages is the hard part! Hint: the “trick” with the tree program was choosing an appropriate ending pont for the loops; for this program, think about finding an appropriate starting point for the loops.