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

如题所述

第1个回答  2013-04-28
可以的
你要在main()之前加个东西#include<math.h>来自:求助得到的回答
第1个回答  2013-04-28
可以,是标准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)本回答被提问者和网友采纳
第2个回答  2013-04-28
#include "stdio.h"
#include "math.h"
void main ()
{
float i=1.0;
printf("%f",sin(i));

}
当然可以
第3个回答  2013-04-28
可以啊,只不过是要math.h这个函数库的
相似回答