1. 程式人生 > >用定積分定義求定積分(c++實現)

用定積分定義求定積分(c++實現)

#include<iostream>
#include<cmath>
using namespace std;
double djf(double a,double b,int n);
double fun(double x);
int main()
{  
 double a,b;
 int n;
 cout<<"請輸入積分下限"<<endl;
 cin>>a;
 cout<<"請輸入積分上限"<<endl;
 cin>>b;
 cout<<"請輸入分割的份數"<<endl;
 cin>>n;
 cout<<djf(a,b,n);