Determine the total number of pairs (x,y) of positive integers that satisfy this equation:
√(x)+ √(y) = √(1988)
for x=1:9999
y=(sqrt(1988)-sqrt(x))^2;
if abs(y-round(y))<.00000001
disp([x,y])
end
end
Only (x,y) = (497,497) is valid among the below findings, as zero is not positive and the other two purported solutions are due to rounding errors.
497 497
1988 0
4473 497
7952 1988
|
Posted by Charlie
on 2024-09-25 08:50:37 |