读书人

一个数学函数调用的有关问题

发布时间: 2012-03-14 12:01:13 作者: rapoo

一个数学函数调用的问题
我想调用cos函数求一个数的余弦函数,该怎么编写程序呢?
我写的是
# include<stdio.h>
# include<math.h>

int main()
{

printf("%f"cos(3.5678));
getch();
}
但是错了 该怎么调用呢?
求高人指点呀!

[解决办法]

C/C++ code
# include<stdio.h># include<math.h>int main(){printf("%f",(float)cos(3.5678));getchar();} 

读书人网 >C++

热点推荐