diff --git a/C++ Programs/squareroot.cpp b/C++ Programs/squareroot.cpp new file mode 100644 index 0000000..e6ad2a9 --- /dev/null +++ b/C++ Programs/squareroot.cpp @@ -0,0 +1,23 @@ + +#include + +using namespace std; + +int main() +{ + +int number; +float t,root; +cout<<"enter the number"<<"\n"; +cin>>number; +root=number/2; +t=0; +while(root != t) +{ + t=root; + root=(number/t+t)/2; +} +cout<<"root"<<"="<