为了账号安全,请及时绑定邮箱和手机立即绑定

c语言能直接输入三角函数符号嘛 比如sin cos?

c语言能直接输入三角函数符号嘛 比如sin cos?

C
凤凰求蛊 2019-02-13 15:11:13
c语言能直接输入三角函数符号嘛 比如sin cos
查看完整描述

2 回答

?
扬帆大鱼

TA贡献1799条经验 获得超9个赞

可以,是标准C函数,语法如下
#include <math.h>

double sin(double x);
double cos(double x);

详细描述:

NAME
sin, sinf, sinl - sine function

SYNOPSIS
#include <math.h>

double sin(double x);
float sinf(float x);
long double sinl(long double x);

Link with -lm.

DESCRIPTION
The sin() function returns the sine of x, where x is given in radians.

RETURN VALUE
The sin() function returns a value between -1 and 1.

CONFORMING TO
SVr4, 4.3BSD, C89. The float and long double variants are C99 requirements.

SEE ALSO
acos(3), asin(3), atan(3), atan2(3), csin(3), cos(3), tan(3)



查看完整回答
反对 回复 2019-02-27
?
慕斯709654

TA贡献1840条经验 获得超5个赞

#include "stdio.h"
#include "math.h"
void main ()
{
float i=1.0;
printf("%f",sin(i));

}
当然可以



查看完整回答
反对 回复 2019-02-27
  • 2 回答
  • 0 关注
  • 1972 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信