#include <cmath> #include <cstdio> double dj(double Min,double Max,double flags=0.00001)//最大值,最小值,精度 { double i,j=0; if(Min>Max)return 0; for(i=Min;i<Max;i+=flags) { j+=sin(flags); //这里求的是sin的 } return j; } int main() { printf("%.6lf",dj(0,3.1415926)); }
时间: 2024-12-08 03:41:59