acos()

christian.dinh2481 total contributions
Published Jun 18, 2021Updated Jul 20, 2023
Contribute to Docs
The acos()
function returns the inverse cosine of the argument in radians.
Syntax
acos(n)
Example 1
Use acos()
to return the inverse cosine of 0.0
:
#include <iostream>#include <cmath>int main() {double x = 0.0;double result;result = std::acos(x);std::cout << result << " radians" << "\n";// Output: 1.5708 radians}
Codebyte Example
The following example is runnable and outputs the inverse cosine of -0.5
:
All contributors
- christian.dinh2481 total contributions
- Anonymous contributorAnonymous contributor3077 total contributions
- net137228473814 total contributions
- Christine_Yang269 total contributions
- garanews209 total contributions
- christian.dinh
- Anonymous contributor
- net1372284738
- Christine_Yang
- garanews
Looking to contribute?
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.