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. 某IT外企面試題-二分法求方程

        時間:2020-11-22 10:45:06 筆試題目 我要投稿

        某IT外企面試題-二分法求方程

          //f(x)=RMAX-R+(R-r)*double (cos(0.5*x))+double (sqrt(r*r-(R-r)*(R-r)* sin(0.500*x)* sin(0.500*x)))

        某IT外企面試題-二分法求方程

          請用二分法或其他方法求出解x.要求精度esp=1e-5

          其中RMAX,R,r從鍵盤輸入。

          #include

          #include

          void get(double RMAX,double R,double r,double x,double y)

          {

          double m,n,c,p;

          double esp=1e-5;

          do

          {

          m=RMAX-R+(R-r)*double (cos(0.5*x))+double (sqrt(r*r-(R-r)*(R-r)* sin(0.500*x)* sin(0.500*x)));

          n=RMAX-R+(R-r)*double (cos(0.500*y))+double (sqrt(r*r-(R-r)*(R-r)* sin(0.500*y)*sin(0.500*y)));

          c=0.500*(x+y);

          p=RMAX-R+(R-r)*double (cos(0.500*c))+double (sqrt(r*r-(R-r)*(R-r)* sin(0.500*c)*sin(0.500*c)));

          if(fabs(p)

          break;

          else if(m*p<0)

          {

          x=x;

          y=c;

          }

          else if (m*p>0)

          {

          y=y;

          x=c;

          }

          }while(fabs(y-x)

          cout<<\”The value of angle:tt\”<<(x+y)*0.5<

          cout<<<\” \”<<<\” \”<<

          }

          void main()

          {

          double RMAX,R,r,x,y;

          cout<<\”input RMAX,R,r,x,y:\”<

          cin>>RMAX;

          cin>>R;

          cin>>r;

          cin>>x;

          cin>>y;

          get(RMAX,R,r,x,y);

          }

        【某IT外企面試題-二分法求方程】相關文章:

        外企應聘最常問的英文面試題09-05

        關于外企求職常見的英語面試題10-02

        面試外企技巧01-29

        外企offer模板11-14

        外企面試禮儀12-16

        求份租房合同02-09

        求青春勵志歌曲10-15

        求面試的技巧01-01

        某外資公司offer模板11-15

        国产高潮无套免费视频_久久九九兔免费精品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>