一:数学中两者的用法:
Y = COS(X)
定义域:R
值域:[-1,1]
代表的图型曲线:
Y = arccos(x)
定义域:[-1,1]
值域:[0,pi]
代表的图型曲线:
Demo–打印圆柱体的表面积:
#include <stdio.h>
#include <math.h>
int main()
{
const int PI = acos(-1.0);
double r,h,s1,s2,s;
scanf("%lf%lf",&r,&h);
s1 = PI*r*r;
s2 = 2*PI*r*h;
s=2*s1+s2;
printf("Area = %.3f",s);
return 0;
}
------算法竞赛-入门经典(刘汝佳)