This is what I wrote down:
AGE OF THE KIDS:
What we know:
-Product of their age is 36
y = youngest
m = middle
o = oldest
YMO = integers
1 < Y < M < O
Let Y, M, O = 1
Repeat
{
Let O = O + 1
If Y x M x O = 36
then print Y, M, O
if (O = 36)
then
{
M = M + 1
O = M
if M = 36
then
{
Y = Y + 1
M = Y
O = M
if Y = 36, exit
}
}
}
Basically the logic is you write down all the possible products of 36, like so:
O M Y SUM
36 1 1 38
18 2 1 21
12 3 1 16
9 4 1 14
9 2 2 13
6 6 1 13
6 3 2 11
4 3 3 10
Now, APPARENTLY the logic is that, because he needed more information after being told the "sum of their age is equal to the amount of windows on the building over there", that there must be more than one solution.
We are distinctly told that there is an oldest - not that there's a distinct middle or youngest, IIRC. So the solution must be (9 * 2 * 2).