scanf("%lf %lf %d",&a,&b,&n);printf("梯形法求积分结果:%lf\n", integral(a,b,n));double f(double x)就是你的f(x)函数,随便写就行吧