• <sub id="h4knl"><ol id="h4knl"></ol></sub>
    <sup id="h4knl"></sup>
      <sub id="h4knl"></sub>

      <sub id="h4knl"><ol id="h4knl"><em id="h4knl"></em></ol></sub><s id="h4knl"></s>
      1. <strong id="h4knl"></strong>

      2. 計算機二級考試C語言試題與答案

        時間:2024-10-27 03:53:30 計算機等級 我要投稿

        計算機二級考試C語言試題與答案

          計算機二級考試在即,yjbys小編為同學們帶來最新C語言考試試題,希望對大家復習C語言有幫助!

        計算機二級考試C語言試題與答案

          程序改錯

          功能:一個5位數,判斷它是不是回文數。即12321是回文數,個

          位與萬位相同,十位與千位相同。

          ------------------------------------------------------*/

          #include "stdio.h"

          main( )

          {

          /**********ERROR**********/

          long ge,shi,qian;wan,x;

          scanf("%ld",&x);

          /**********ERROR**********/

          wan=x000;

          qian=x000/1000;

          shi=x0/10;

          ge=x;

          /**********ERROR**********/

          if (ge==wan||shi==qian)

          printf("this number is a huiwen\n");

          else

          printf("this number is not a huiwen\n");

          }

          改:long ge,shi,qian,wan,x;

          wan=x/10000;

          if (ge==wan&&shi==qian)

          /*------------------------------------------------------

          【程序改錯】

          --------------------------------------------------------

          功能:用下面的和式求圓周率的近似值。直到最后一項的絕對值

          小于等于0.0001。

          π/4= 1- 1/3 + 1/5 - 1/7 ....

          ------------------------------------------------------*/

          #include "stdio.h"

          /**********ERROR**********/

          #include "math"

          void fun()

          {

          float s=0,t=1,i=1;

          /**********ERROR**********/

          int p=1;

          /**********ERROR**********/

          while(fabs(t)<=1e-4)

          {

          s=s+t;

          p=-p;

          i=i+2;

          t=p/i;

          }

          /**********ERROR**********/

          printf("pi=%d\n",s*4);

          }

          main()

          {

          fun();

          改:#include "math.h"

          float p=1;

          while(fabs(t)>1e-4)

          while(0.0001

          while(1e-4

          while(fabs(t)>0.0001)

        《&.doc》
        将本文的Word文档下载到电脑,方便收藏和打印
        推荐度:
        点击下载文档

        【計算機二級考試C語言試題與答案】相關文章:

        計算機二級C語言考試試題及答案10-09

        計算機二級C語言考試上機沖刺試題及答案09-08

        計算機等級考試二級C語言考試試題(帶答案)10-30

        計算機二級C語言模擬試題及答案08-25

        計算機二級《C語言》模擬試題及答案07-31

        計算機二級C語言沖刺試題及答案10-29

        計算機二級考試C++試題及答案08-01

        計算機二級考試C++試題及答案10-08

        2024最新計算機二級c語言試題及答案10-25

        計算機C語言試題及答案07-26

        国产高潮无套免费视频_久久九九兔免费精品6_99精品热6080YY久久_国产91久久久久久无码
      3. <sub id="h4knl"><ol id="h4knl"></ol></sub>
        <sup id="h4knl"></sup>
          <sub id="h4knl"></sub>

          <sub id="h4knl"><ol id="h4knl"><em id="h4knl"></em></ol></sub><s id="h4knl"></s>
          1. <strong id="h4knl"></strong>

          2. 亚洲欧美国产va在线播放频 | 亚洲第一视频免费在线 | 亚洲日韩高清在线亚洲专区2021 | 一区二区国产精品 | 亚洲日韩精品一区粉嫩 | 中文在线一区精品 |

            計算機二級考試C語言試題與答案

              計算機二級考試在即,yjbys小編為同學們帶來最新C語言考試試題,希望對大家復習C語言有幫助!

            計算機二級考試C語言試題與答案

              程序改錯

              功能:一個5位數,判斷它是不是回文數。即12321是回文數,個

              位與萬位相同,十位與千位相同。

              ------------------------------------------------------*/

              #include "stdio.h"

              main( )

              {

              /**********ERROR**********/

              long ge,shi,qian;wan,x;

              scanf("%ld",&x);

              /**********ERROR**********/

              wan=x000;

              qian=x000/1000;

              shi=x0/10;

              ge=x;

              /**********ERROR**********/

              if (ge==wan||shi==qian)

              printf("this number is a huiwen\n");

              else

              printf("this number is not a huiwen\n");

              }

              改:long ge,shi,qian,wan,x;

              wan=x/10000;

              if (ge==wan&&shi==qian)

              /*------------------------------------------------------

              【程序改錯】

              --------------------------------------------------------

              功能:用下面的和式求圓周率的近似值。直到最后一項的絕對值

              小于等于0.0001。

              π/4= 1- 1/3 + 1/5 - 1/7 ....

              ------------------------------------------------------*/

              #include "stdio.h"

              /**********ERROR**********/

              #include "math"

              void fun()

              {

              float s=0,t=1,i=1;

              /**********ERROR**********/

              int p=1;

              /**********ERROR**********/

              while(fabs(t)<=1e-4)

              {

              s=s+t;

              p=-p;

              i=i+2;

              t=p/i;

              }

              /**********ERROR**********/

              printf("pi=%d\n",s*4);

              }

              main()

              {

              fun();

              改:#include "math.h"

              float p=1;

              while(fabs(t)>1e-4)

              while(0.0001

              while(1e-4

              while(fabs(t)>0.0001)