/*#includestdio.hvoidmain(){printf(hello);}*/#includestdio.h#includemath.hdoublef(doublex){returnsin(x);//此处可以更改积分函数}voidmain(){doubleh,T=0.0,s;intk,n=100;doublea=0,b=3.141593;//变量改变行,积分上下边界a,b可改,n是等分数h=(b-a)/n;for(k=1;kn;k++){T+=f(a+k*h);}s=(h/2.0)*(f(a)+2*T+f(b));printf(结果是:%lf\n,s);}