sqrt( value ); |
The function sqrt() cmath library (math.h) It takes the value parameter and returns the square root.
If the ( in our case – value) negative, an error.
1 2 3 4 5 6 7 8 9 10 11 | #include <iostream> #include <cmath> int main () { int value = 25; std::cout << sqrt(value) << std::endl; return 0; } |
The result is shown in the run online compiler ideone
I have no connection, and works cmath sqrt() visual 2017