此函數提供計算數字反餘弦的函數。數字應小於等於 1 且大於等於 0。
該函數以單個參數作為需要計算其反餘弦值的數,並返回計算結果的值。
例:
X = 0.2 The function will return 1.369438
該函數是math.h
在使用此函數之前應包含在程序中的庫。
math.h - C 中的 acos() 函數示例
#include <stdio.h>
#include <math.h>
int main()
{
// Defining variables
double a,b;
// Assigning value for getting acos value
a = 0.2;
// Calculating the arc cosine of a
b = acos(a);
// Displaying the result for the user
printf("The calculated value is:%lf \n\n", b);
return 0;
}
輸出

相關用法
- C語言 atan2()用法及代碼示例
- C語言 abs()用法及代碼示例
- C語言 asin()用法及代碼示例
- C語言 atan()用法及代碼示例
- C語言 assert()用法及代碼示例
- C語言 arc()用法及代碼示例
- C語言 asctime()、asctime_s()用法及代碼示例
- C語言 fread()用法及代碼示例
- C語言 feof()用法及代碼示例
- C語言 imagesize()用法及代碼示例
- C語言 getarcoords()用法及代碼示例
- C語言 strcspn()用法及代碼示例
- C語言 setlinestyle()用法及代碼示例
- C語言 showbits()用法及代碼示例
- C語言 sprintf()用法及代碼示例
- C語言 outtextxy()用法及代碼示例
- C語言 isgraph()用法及代碼示例
- C語言 grapherrormsg()用法及代碼示例
- C語言 moveto()用法及代碼示例
- C語言 putchar()用法及代碼示例
注:本文由純淨天空篩選整理自Manu Jemini大神的英文原創作品 acos() function of math.h in C。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。