I didnt know where to post this question...
Find all six digit square numbers having all digits even..
Is there any method to do this or is it trial and error?
Trial and error, BUT with some logic!
You know leftmost digit can't be 1 or 3 or 5 or 7 or 9;
so start in 200000-299999 range;
sqrt(200000) = 447.213...;
so start with 448: 448^2 = 200704 ; no, has 7
next 450 (don't try 449 or any odd number: last digit will be odd);
450^2 = 202500 ; no, has 5
x is 100's digit
y is 10's digit
z is 1's digit
as pointed out previously, z must be an even digit.
if y is odd, then x must be odd to "even" out the
If x is odd, it is restricted to 5,7 or 9.
When z = 4 or 6 you'll have an odd carry
that gets into the final number.
z cannot be 4 or 6