[解决办法] 我测试了,估计lz定义double的时候错了。我的测试代码,木有问题。 double a1,a2,a3,b1,b2,b3; printf("input a1,b1\n"); //分别通过调用函数的参数不同实现不同功能,输出。 scanf("%lf,%lf",&a1,&b1);//lz这写的有问题 printf("\n(sin) the result is: %lf,%lf\tcount(p,a1,b1)\n",a1,b1);
printf("input a2,b2\n"); scanf("%lf,%lf",&a2,&b2); printf("\n(cos) the result is: %lf,%lf\tcount(cos,a2,b2)\n",a2,b2);
printf("input a3,b3\n"); scanf("%lf,%lf",&a3,&b3); printf("\n(exp) the result is: %lf,%lf\tcount(exp,a3,b3)\n",a3,b3);