// // FILE: binsqrt.cpp // Author: Leo Reyzin // Purpose: code to take in an integer and find its integer square root // HW3 of CS112B1 Spring 2003 // #include using namespace std; // Outputs the integer square root of x, that is, // the largest integer y such that y*y<=x. // For example, binsqrt(0)=0, binsqrt(5)=2, binsqrt(9)=3. unsigned int binsqrt(unsigned int x) { CODE GOES HERE } int main() { unsigned int x; cin >> x; cout << binsqrt(x) <<'\n'; return 0; }