0
Square root
How can the square root of a number be found?
2 odpowiedzi
0
The easiest way to do it without using functions is to exponentiate the number by 0.5
sqrt = x**0.5
0
Using the <cmath> header file you can make use of the sqrt function
E.g. int square_root = sqrt (int x)