c语言编程:编程并计算sin(x)的值
c语言编程:编程并计算sin(x)的值
日期:2017-11-27 00:23:20 人气:1
#include#includedouble sin(double);double nResult(double,double);int main(){ double x=0; scanf("%lf",&x); printf("sin(%lf)=%lf\n",x,sin(x)); return 0;}double sin(double x){ //sin(x)=x-x^3/3!+x^5/5!-x^7/7!+……+(-1