Implement int sqrt(int x)
.
Compute and return the square root of x.
int mySqrt(int x)
{
if(x==)
return ; /* for(int i=2;i<=x/2;i++)
{
if(x=i*i)
{
return i;
}
}*/ return (int)sqrt(x); }
2023-10-18 17:44:04
Implement int sqrt(int x)
.
Compute and return the square root of x.
int mySqrt(int x)
{
if(x==)
return ; /* for(int i=2;i<=x/2;i++)
{
if(x=i*i)
{
return i;
}
}*/ return (int)sqrt(x); }