C语言库acos()函数

#include stdio.h#include math.h#define PI 3.14159265int main () {double x, ret, val;x = 0.9;

编程学习网为您整理以下代码实例,主要实现:C语言库acos()函数,希望可以帮到各位朋友。

#include <stdio.h>
#include <math.h>

#define PI 3.14159265

int main () {
   double x, ret, val;

   x = 0.9;
   val = 180.0 / PI;

   ret = acos(x) * val;
   printf("The arc cosine of %lf is %lf degrees", x, ret);

   return(0);
}

本文标题为:C语言库acos()函数

基础教程推荐