#include
专业从事成都网站制作、成都网站设计、外贸营销网站建设,高端网站制作设计,小程序开发,网站推广的成都做网站的公司。优秀技术团队竭力真诚服务,采用HTML5+CSS3前端渲染技术,成都响应式网站建设,让网站在手机、平板、PC、微信下都能呈现。建站过程建立专项小组,与您实时在线互动,随时提供解决方案,畅聊想法和感受。
//包含数学函数库就可以了
//可以使用atan()
asin(),
acos()等进行反三角函数计算
包含头文件 math.h
反3角函数有 acos(double),asin(double),atan(double),atan(double,double),
返回值 double 型,弧度值。转角度要 *180.0/3.1416
例如:
#include stdio.h
#includestdlib.h
#includemath.h
int main()
{
double x=0.5;
printf("acos=%.2lf degrees\n",acos(x) * 180.0/3.1416);
printf("asin=%.2lf degrees\n",asin(x) * 180.0/3.1416);
printf("atan=%.2lf degrees\n",atan(x) * 180.0/3.1416);
printf("atan2=%.2lf degrees\n",atan2(1.0,2.0) * 180.0/3.1416);
return 0;
}
#includestdio.h
#include math.h
void main()
{
double a,b,c,d;
scanf("%f,%f",b,d);
a=sin(b);/*这是三角函数*/
c=asin(d);/*这是反三角函数*/
printf("sin(b)=%f,asin(d)=%d",a,c);
}
其他三角函数如cos(x)什么的,可以直接用,前提有math.h的头文件
当前标题:倒三角函数c语言 倒三角图案用c语言如何编写
网站链接:https://www.cdcxhl.com/article14/ddeecge.html
成都网站建设公司_创新互联,为您提供网站导航、网站制作、、静态网站、网站改版、Google
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联