Answers for "write algorithm to find whether a number is perfect square python"

C++
0

how to check sqrt of number is integer c++

bool isPerfectSquare(long double x) 
{   
  // Find floating point value of  
  // square root of x. 
  long double sr = sqrt(x); 
  
  // If square root is an integer 
  return ((sr - floor(sr)) == 0); 
}
Posted by: Guest on May-16-2020
1

python num perfect squares

print(int(int(n)**.5))
Posted by: Guest on July-24-2020

Code answers related to "write algorithm to find whether a number is perfect square python"

Browse Popular Code Answers by Language