QuickBasic, of course, stops as soon as it tries to take the square root of a negative number, but UBASIC takes it in stride:
10 for N=1 to 10000
40 if D>0.99999 or D<0.00001 then print N,V
Of course the rounding errors lead to those almost-integers that really should be integers.
In each case n is an integer and the result is an integer, so I see nothing wrong with all of them counting as solutions ad infinitum.
Posted by Charlie
on 2009-03-20 15:43:58