Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
std::sqrt is an STL function to obtain the square root of a double.
#include <cmath> #include <iostream> int main() { std::cout << std::sqrt(2.0) << '\n'; }