1. <tt id="5hhch"><source id="5hhch"></source></tt>
    1. <xmp id="5hhch"></xmp>

  2. <xmp id="5hhch"><rt id="5hhch"></rt></xmp>

    <rp id="5hhch"></rp>
        <dfn id="5hhch"></dfn>

      1. 用矩形法求定積分的通用函數

        時間:2020-11-21 17:39:02 筆試題目 我要投稿

        用矩形法求定積分的通用函數

          解: #include

          main()

          { float integral(float(8p)(float),float a,float b,int n);

          float a1,b1,a2,b2,a3,b3,c,(*p)(float);

          float fsin(float);

          float fcos(float);

          float fexp(float);

          int n=20;

          printf(“Input a1,b1:”);

          scanf(“%f,%f”,&a1,&b2);

          printf(“Input a2,b2:”);

          scanf(“%f,%f”,&a2,&b2);

          printf(“Input a3,b3:”);

          scanf(“%f,%f”,&a3,b3);

          p=fsin;

          c=integral(p,a1,b1,n);

          printf(“The integral of sin(x) is:%f\n”,c);

          p=fcos;

          c=integral(p,a2,b2,n);

          printf(“The integral of cos(x) is :%f\n”,c);

          c=integral(p,a3,b3,n);

          printf(“The integral of sin(x) is :%f\n”,c);

          }

          float integral(float (*p)(float),float a,float b,int n)

          {

          int i;

          floatx,h,s;

          h=(b-a)/n;

          x=a;

          s=0;

          for(i=1;i<=n;i++)

          {x=x+h;

          s=s+(*p)(x)*h;

          }

          return(s);

          }

          float fsin(float x)

          {return sin(x);}

          float fcos(float x)

          {return cos(x);}

          float fexp(float x)

          {return exp(x);}

        【用矩形法求定積分的通用函數】相關文章:

        考研數學定積分備考方法01-22

        微積分的函數連續考研數學解析12-25

        考研數學:關于定積分的三點建議12-27

        考研數學定積分復習三大要點01-19

        考研數學定與不定積分的知識點01-17

        怎么用cad畫函數圖10-02

        CAD畫矩形的方法09-30

        CAD矩形的繪制方法08-11

        CAD繪制矩形的教程08-10

        国产高潮无套免费视频_久久九九兔免费精品6_99精品热6080YY久久_国产91久久久久久无码

        1. <tt id="5hhch"><source id="5hhch"></source></tt>
          1. <xmp id="5hhch"></xmp>

        2. <xmp id="5hhch"><rt id="5hhch"></rt></xmp>

          <rp id="5hhch"></rp>
              <dfn id="5hhch"></dfn>