From 1a4f6cd03c242111f5830286402a65e4eebf5d99 Mon Sep 17 00:00:00 2001 From: Karthikpillai77 <56841541+Karthikpillai77@users.noreply.github.com> Date: Thu, 13 Oct 2022 23:51:03 +0530 Subject: [PATCH] Create squareroot.cpp --- C++ Programs/squareroot.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 C++ Programs/squareroot.cpp 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"<<"="<