Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To use std::sqrt as a parameter, you can simply pass the value you want to calculate the square root of as an argument to the std::sqrt function:

double x = 16.0;
double y = std::sqrt(x);

In this example, the variable y would be assigned the value 4.0, which is the square root of 16.0.