Quote:
Originally Posted by JohnFullspeed
When you search a perfzct square the first step is to test the last digit
I need tto find value with 3 like last didit
Id ity possible to make one or two tests like
(n & 7 == 1) or (n & 31 == 4) or (n & 127 == 16) or (n & 191 == 0) then John

if you want to check the last decimal digit of a number do mod 10 and compare to the endings of squares ( 0,1,4,9,6,5) is how I would do it. also if (x(x mod 10 ))/10 is a certain type of number you can tell if it's a square even more.