Horje
how to check sqrt of number is integer c++ Code Example
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); 
} 




Cpp

Related
max function in c++ Code Example max function in c++ Code Example
delete one specific character in string C++ Code Example delete one specific character in string C++ Code Example
round double to n decimal places c++ Code Example round double to n decimal places c++ Code Example
how to dynamically allocate an array c++ Code Example how to dynamically allocate an array c++ Code Example
how to round a double to 2 decimal places in c++ Code Example how to round a double to 2 decimal places in c++ Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7