If I take the square root of a number and then square the result I'll get the same number.
If I take a number and take the square root, then obliterate anything after the decimal point (cast to int perhaps) then square that result I can compare it to the original number and see if they're the same. If they're the same then the square root must have been a whole number.
That's legit, right?
No comments:
Post a Comment