[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
CppSqrt
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
CppSqrt
(C++) std::sqrt
Standard function for taking the square root of a value.int main() { const double myValue = 2.0; const double myRoot = std::sqrt(myValue); std::cout << "The square root of " << myValue << " equals " << myRoot << std::endl; }
- include <cmath>
- include <iostream>
Code links
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
