#include#include#define e 0.00001double f(double x){ return sqrt(x*x-4); }double Simpson(double a,double b,double f(double x),double eps){ int n=1,k; double h,Tn,T2n,s,x,p=eps+1.0; h=b-a; Tn=h*(f(a)+f(b))/2;//T1 while(p>eps){ s=0; x=a+0.5*h; for(k=0;k
求已知函数的的定积分(用指向函数的指针)