0

What is the code used in the sqrt() function or the square root function

Without using the function in the header file

28th Jan 2020, 2:47 AM
SIDDHESH
SIDDHESH - avatar
5 Réponses
28th Jan 2020, 4:58 AM
Mihai Apostol
Mihai Apostol - avatar
+ 5
are you asking about the library #include <cmath> which in earlier versions of cpp was <math.h> // C++ code to demonstrate the example of // sqrt() function #include <iostream> #include <cmath> using namespace std; // main code section int main() { float x; //input the value cout<<"Enter a number: "; cin>>x; // calculate the square root float result = sqrt(x); cout<<"square root of "<<x<<" is = "<<result; cout<<endl; return 0; }
28th Jan 2020, 3:11 AM
BroFar
BroFar - avatar
0
I am looking forward to Code sqrt function without using math.h library in cpp please help
28th Jan 2020, 4:21 AM
SIDDHESH
SIDDHESH - avatar
0
Patel Urvashi please refrain from cussing or using profanity Please follow the guidelines https://www.sololearn.com/discuss/1316935/?ref=app
29th Jan 2020, 12:49 AM
BroFar
BroFar - avatar
- 1
Hey what the <edit>.How many times it will say to update it.this is even not letting me see my last quiz!!!!! Edit: Please dont use profanity.
29th Jan 2020, 12:15 AM
Patel Urvashi
Patel Urvashi - avatar