+ 4

How can i get square root of any number?

16th Sep 2018, 2:24 PM
Parmal Chouriya
Parmal Chouriya - avatar
10 odpowiedzi
16th Sep 2018, 3:38 PM
Raqun Bob
Raqun Bob - avatar
+ 10
#include <iostream> #include <cmath> using namespace std; int main() { int num = 10; cout << "Square Root of " << num << " is: "<< sqrt(num) << endl; return 0; }
16th Sep 2018, 8:15 PM
blACk sh4d0w
blACk sh4d0w - avatar
+ 6
to find a squar root in java use a function called. Math.sqrt ();
17th Sep 2018, 5:02 PM
Purab Gupta
Purab Gupta - avatar
+ 3
On python: import math math.sqrt()
16th Sep 2018, 2:41 PM
Raqun Bob
Raqun Bob - avatar
+ 2
is it possible to get square root on c++ ?
16th Sep 2018, 3:10 PM
Parmal Chouriya
Parmal Chouriya - avatar
+ 2
nAutAxH AhmAd thank you very much.
17th Sep 2018, 6:08 AM
Parmal Chouriya
Parmal Chouriya - avatar
+ 1
if you want to do it without any builtin function using loops, you may want to look at newton method.
17th Sep 2018, 2:48 AM
Mayank
Mayank - avatar
0
Study Math on Python it might help you.
17th Sep 2018, 12:18 PM
Joshua Martin Fontanilla
Joshua Martin Fontanilla - avatar
0
raise the number by 1/2 in python, assuming the number is going to be inputed x = int(input()) y = x**(1/2) #if it's cube root 1/3 print(y)
18th Sep 2018, 5:40 AM
Joseph Ojo
Joseph Ojo - avatar
0
simply type sqrt(a,2)
21st Sep 2018, 11:24 AM
zeeshan
zeeshan  - avatar