Ask Your Question
1

What is the method for using std::sqrt as a parameter?

asked 2023-07-07 01:32:15 +0000

ladyg gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-07-07 01:48:02 +0000

pufferfish gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-07-07 01:32:15 +0000

Seen: 7 times

Last updated: Jul 07 '23