亚洲喷奶水中文字幕电影,日本aⅴ高清一区二区三区,欧美亚洲日本国产,欧美日韩亚洲中文字幕

<legend id="flx4p"><abbr id="flx4p"><thead id="flx4p"></thead></abbr></legend>

<mark id="flx4p"><thead id="flx4p"></thead></mark>

      我要投稿 投訴建議

      全國(guó)計(jì)算機(jī)等級(jí)四級(jí)機(jī)試試題及答案二(1-10)

      時(shí)間:2022-07-23 17:47:29 計(jì)算機(jī)等級(jí) 我要投稿
      • 相關(guān)推薦

      全國(guó)計(jì)算機(jī)等級(jí)四級(jí)機(jī)試試題及答案二(1-10)

      1./* 程序PROG1.C的功能是:選出100至1000之間所有個(gè)位數(shù)字與十位數(shù)字之和被10除所得余數(shù)恰是百位數(shù)字的素?cái)?shù)(如293)。計(jì)算并輸出上述這些素?cái)?shù)的個(gè)數(shù)cnt以及這些素?cái)?shù)值的和sum。
        請(qǐng)考生編寫函數(shù)countValue( )實(shí)現(xiàn)程序的要求,最后調(diào)用函數(shù)writeDAT( )把結(jié)果cnt和sum輸出到文件out6.DAT中。
        注意:部分源程序存放在PROG1.C中。
        請(qǐng)勿改動(dòng)主函數(shù)main( )和輸出數(shù)據(jù)函數(shù)writeDAT( )的內(nèi)容。 */
      #include
      int cnt, sum ;
      void countValue()
      {
      }
      void main()
      {
      cnt = sum = 0 ;
      countValue() ;
      printf("素?cái)?shù)的個(gè)數(shù)=%dn", cnt) ;
      printf("滿足條件素?cái)?shù)值的和=%d", sum) ;
      writeDAT() ;
      }
      writeDAT()
      {
      FILE *fp ;
      fp = fopen("OUT6.DAT", "w") ;
      fprintf(fp, "%dn%dn", cnt, sum) ;
      fclose(fp) ;
      }
      2. /* 編寫函數(shù)sumValue( ),它的功能是:計(jì)算正整數(shù)n的所有因子(1和n除外)之
      和作為函數(shù)值返回。
        例如:n=20時(shí),函數(shù)值為21。
        函數(shù)ReadWrite( )是實(shí)現(xiàn)從文件in9.dat中讀取兩個(gè)字符串,并調(diào)用函數(shù)sumValue(),最后把結(jié)果輸出到文件out9.dat中。
        注意:部分源程序存在文件PROG1.C中,請(qǐng)勿改動(dòng)主函數(shù)main()和其它函數(shù)
      中的任何內(nèi)容,僅在函數(shù)sumValue()的花括號(hào)中填入你編寫的若干語句。 */
      #include
      #include
      int sumValue(int n)
      {
      }
      main()
      { clrscr() ;
      printf("%dn", sumValue(20)) ;
      ReadWrite() ;
      }
      ReadWrite()
      {
      FILE *fp, *wf ;
      int i, n, s ;
      fp = fopen("in9.dat","r") ;
      if(fp == NULL) {
      printf("數(shù)據(jù)文件in9.dat不存在!") ;
      return ;
      }
      wf = fopen("out9.dat","w") ;
      for(i = 0 ; i < 10 ; i++) {
      fscanf(fp, "%d", &n) ;
      s = sumValue(n) ;
      fprintf(wf, "%dn", s) ;
      }
      fclose(fp) ;
      fclose(wf) ;
      } http://jzcjspjx.com/

      【全國(guó)計(jì)算機(jī)等級(jí)四級(jí)機(jī)試試題及答案二(1-10)】相關(guān)文章:

      2017全國(guó)計(jì)算機(jī)等級(jí)考試試題及答案08-07

      全國(guó)計(jì)算機(jī)等級(jí)考試一級(jí)試題及答案08-07

      計(jì)算機(jī)等級(jí)考試試題及答案08-09

      2017全國(guó)計(jì)算機(jī)等級(jí)考試一級(jí)試題及答案08-07

      2017年計(jì)算機(jī)等級(jí)考試試題及答案08-08

      2014年計(jì)算機(jī)等級(jí)考試四級(jí)考試模擬試題08-10

      全國(guó)計(jì)算機(jī)等級(jí)考試一級(jí)ms office試題08-09

      2017年江蘇省計(jì)算機(jī)等級(jí)考試試題及答案08-06

      2016年計(jì)算機(jī)四級(jí)考試試題及答案08-07

      2016年全國(guó)計(jì)算機(jī)一級(jí)試題及答案08-05