奶头挺立呻吟高潮av全片,成人试看120秒体验区,性欧美极品v,A片高潮抽搐揉捏奶头视频

試題

計算機等級考試四級上機編程試題及答案

時間:2025-02-17 22:26:45 試題 我要投稿
  • 相關(guān)推薦

2016年計算機等級考試四級上機編程試題及答案

  第一套

2016年計算機等級考試四級上機編程試題及答案

  ===============================================================================

  試題說明 :

  ===============================================================================

  已知在文件IN.DAT中存有若干個(個數(shù)<200)四位數(shù)字的正整數(shù), 函數(shù)ReadDat( )是讀取這若干個正整數(shù)并存入數(shù)組xx中。請編制函數(shù)CalValue( ), 其功能要求: 1. 求出這文件中共有多少個正整數(shù)totNum; 2.求出這些數(shù)中的各位數(shù)字之和是偶數(shù)的數(shù)的個數(shù)totCnt, 以及滿足此條件的這些數(shù)的算術(shù)平均值totPjz, 最后調(diào)用函數(shù)WriteDat()把所求的結(jié)果輸出到文件OUT2.DAT中。

  注意: 部分源程序存放在PROG1.C中。

  請勿改動主函數(shù)main( )、讀數(shù)據(jù)函數(shù)ReadDat()和輸出數(shù)據(jù)

  函數(shù)WriteDat()的內(nèi)容。

  ===============================================================================

  程序 :

  ===============================================================================

  #include

  #include

  #define MAXNUM 200

  int xx[MAXNUM] ;

  int totNum = 0 ; /* 文件IN.DAT中共有多少個正整數(shù) */

  int totCnt = 0 ; /* 符合條件的正整數(shù)的個數(shù) */

  double totPjz = 0.0 ; /* 平均值 */

  int ReadDat(void) ;

  void WriteDat(void) ;

  void CalValue(void)

  {

  }

  void main()

  {

  clrscr() ;

  if(ReadDat()) {

  printf("數(shù)據(jù)文件IN.DAT不能打開!07n") ;

  return ;

  }

  CalValue() ;

  printf("文件IN.DAT中共有正整數(shù)=%d個n", totNum) ;

  printf("符合條件的正整數(shù)的個數(shù)=%d個n", totCnt) ;

  printf("平均值=%.2lfn", totPjz) ;

  WriteDat() ;

  }

  int ReadDat(void)

  {

  FILE *fp ;

  int i = 0 ;

  if((fp = fopen("in.dat", "r")) == NULL) return 1 ;

  while(!feof(fp)) {

  fscanf(fp, "%d,", &xx[i++]) ;

  }

  fclose(fp) ;

  return 0 ;

  }

  void WriteDat(void)

  {

  FILE *fp ;

  fp = fopen("OUT2.DAT", "w") ;

  fprintf(fp, "%dn%dn%.2lfn", totNum, totCnt, totPjz) ;

  fclose(fp) ;

  }

  ===============================================================================

  所需數(shù)據(jù) :

  ===============================================================================

  @2 IN.DAT 016

  6045,6192,1885,3580,8544,6826,5493,8415,3132,5841,

  6561,3173,9157,2895,2851,6082,5510,9610,5398,5273,

  3438,1800,6364,6892,9591,3120,8813,2106,5505,1085,

  5835,7295,6131,9405,6756,2413,6274,9262,5728,2650,

  6266,5285,7703,1353,1510,2350,4325,4392,7573,8204,

  7358,6365,3135,9903,3055,3219,3955,7313,6206,1631,

  5869,5893,4569,1251,2542,5740,2073,9805,1189,7550,

  4362,6214,5680,8753,8443,3636,4495,9643,3782,5556,

  1018,9729,8588,2797,4321,4714,9658,8997,2080,5912,

  9968,5558,9311,7047,6138,7618,5448,1466,7075,2166,

  4025,3572,9605,1291,6027,2358,1911,2747,7068,1716,

  9661,5849,3210,2554,8604,8010,7947,3685,2945,4224,

  7014,9058,6259,9503,1615,1060,7787,8983,3822,2471,

  5146,7066,1029,1777,7788,2941,3538,2912,3096,7421,

  9175,6099,2930,4685,8465,8633,2628,7155,4307,9535,

  4274,2857,6829,6226,8268,9377,9415,9059,4872,6072,

  #E

  @3 $OUT2.DAT 003

  |160|91|5517.16

  #E

  第二套

  ===============================================================================

  試題說明 :

  ===============================================================================

  已知在文件IN.DAT中存有若干個(個數(shù)<200)四位數(shù)字的正整數(shù), 函數(shù)ReadDat( )編制函數(shù)CalValue( ), 其功能要求: 1. 求出這文件中共有多少個正整數(shù)totNum; 2.求出這些數(shù)中的各位數(shù)字之和是奇數(shù)的數(shù)的個數(shù)totCnt, 以及滿足此條件的這些數(shù)的算術(shù)平均值totPjz, 最后調(diào)用函數(shù)WriteDat()把所求的結(jié)果輸出到文件OUT1.DAT中。

  注意: 部分源程序存放在PROG1.C中。

  請勿改動主函數(shù)main( )、讀數(shù)據(jù)函數(shù)ReadDat()和輸出數(shù)據(jù)

  函數(shù)WriteDat()的內(nèi)容。

  ===============================================================================

  程序 :

  ===============================================================================

  #include

  #include

  #define MAXNUM 200

  int xx[MAXNUM] ;

  int totNum = 0 ; /* 文件IN.DAT中共有多少個正整數(shù) */

  int totCnt = 0 ; /* 符合條件的正整數(shù)的個數(shù) */

  double totPjz = 0.0 ; /* 平均值 */

  int ReadDat(void) ;

  void WriteDat(void) ;

  void CalValue(void)

  {

  }

  void main()

  {

  clrscr() ;

  if(ReadDat()) {

  printf("數(shù)據(jù)文件IN.DAT不能打開!07n") ;

  return ;

  }

  CalValue() ;

  printf("文件IN.DAT中共有正整數(shù)=%d個n", totNum) ;

  printf("符合條件的正整數(shù)的個數(shù)=%d個n", totCnt) ;

  printf("平均值=%.2lfn", totPjz) ;

  WriteDat() ;

  }

  int ReadDat(void)

  {

  FILE *fp ;

  int i = 0 ;

  if((fp = fopen("in.dat", "r")) == NULL) return 1 ;

  while(!feof(fp)) {

  fscanf(fp, "%d,", &xx[i++]) ;

  }

  fclose(fp) ;

  return 0 ;

  }

  void WriteDat(void)

  {

  FILE *fp ;

  fp = fopen("OUT1.DAT", "w") ;

  fprintf(fp, "%dn%dn%.2lfn", totNum, totCnt, totPjz) ;

  fclose(fp) ;

  }

  ===============================================================================

  所需數(shù)據(jù) :

  ===============================================================================

  @2 IN.DAT 016

  6045,6192,1885,3580,8544,6826,5493,8415,3132,5841,

  6561,3173,9157,2895,2851,6082,5510,9610,5398,5273,

  3438,1800,6364,6892,9591,3120,8813,2106,5505,1085,

  5835,7295,6131,9405,6756,2413,6274,9262,5728,2650,

  6266,5285,7703,1353,1510,2350,4325,4392,7573,8204,

  7358,6365,3135,9903,3055,3219,3955,7313,6206,1631,

  5869,5893,4569,1251,2542,5740,2073,9805,1189,7550,

  4362,6214,5680,8753,8443,3636,4495,9643,3782,5556,

  1018,9729,8588,2797,4321,4714,9658,8997,2080,5912,

  9968,5558,9311,7047,6138,7618,5448,1466,7075,2166,

  4025,3572,9605,1291,6027,2358,1911,2747,7068,1716,

  9661,5849,3210,2554,8604,8010,7947,3685,2945,4224,

  7014,9058,6259,9503,1615,1060,7787,8983,3822,2471,

  5146,7066,1029,1777,7788,2941,3538,2912,3096,7421,

  9175,6099,2930,4685,8465,8633,2628,7155,4307,9535,

  4274,2857,6829,6226,8268,9377,9415,9059,4872,6072,

  #E

  @3 $OUT1.DAT 003

  |160|69|5460.51

  #E

  第三套

  ===============================================================================

  試題說明 :

  ===============================================================================

  已知在文件IN.DAT中存有若干個(個數(shù)<200)四位數(shù)字的正整數(shù), 函數(shù)ReadDat( )是讀取這若干個正整數(shù)并存入數(shù)組xx中。請編制函數(shù)CalValue( ), 其功能要求: 1. 求出這文件中共有多少個正整數(shù)totNum; 2. 求這些數(shù)右移1位后, 產(chǎn)生的新數(shù)是奇數(shù)的數(shù)的個數(shù)totCnt, 以及滿足此條件的這些數(shù)(右移前的值)的算術(shù)平均值totPjz, 最后調(diào)用函數(shù)WriteDat()把所求的結(jié)果輸出到文件OUT3.DAT中。

  注意: 部分源程序存放在PROG1.C中。

  請勿改動主函數(shù)main( )、讀數(shù)據(jù)函數(shù)ReadDat()和輸出數(shù)據(jù)

  函數(shù)WriteDat()的內(nèi)容。

  ===============================================================================

  程序 :

  ===============================================================================

  #include

  #include

  #define MAXNUM 200

  int xx[MAXNUM] ;

  int totNum = 0 ; /* 文件IN.DAT中共有多少個正整數(shù) */

  int totCnt = 0 ; /* 符合條件的正整數(shù)的個數(shù) */

  double totPjz = 0.0 ; /* 平均值 */

  int ReadDat(void) ;

  void WriteDat(void) ;

  void CalValue(void)

  {

  }

  void main()

  {

  clrscr() ;

  if(ReadDat()) {

  printf("數(shù)據(jù)文件IN.DAT不能打開!07n") ;

  return ;

  }

  CalValue() ;

  printf("文件IN.DAT中共有正整數(shù)=%d個n", totNum) ;

  printf("符合條件的正整數(shù)的個數(shù)=%d個n", totCnt) ;

  printf("平均值=%.2lfn", totPjz) ;

  WriteDat() ;

  }

  int ReadDat(void)

  {

  FILE *fp ;

  int i = 0 ;

  if((fp = fopen("in.dat", "r")) == NULL) return 1 ;

  while(!feof(fp)) {

  fscanf(fp, "%d,", &xx[i++]) ;

  }

  fclose(fp) ;

  return 0 ;

  }

  void WriteDat(void)

  {

  FILE *fp ;

  fp = fopen("OUT3.DAT", "w") ;

  fprintf(fp, "%dn%dn%.2lfn", totNum, totCnt, totPjz) ;

  fclose(fp) ;

  }

  ===============================================================================

  所需數(shù)據(jù) :

  ===============================================================================

  @2 IN.DAT 016

  6045,6192,1885,3580,8544,6826,5493,8415,3132,5841,

  6561,3173,9157,2895,2851,6082,5510,9610,5398,5273,

  3438,1800,6364,6892,9591,3120,8813,2106,5505,1085,

  5835,7295,6131,9405,6756,2413,6274,9262,5728,2650,

  6266,5285,7703,1353,1510,2350,4325,4392,7573,8204,

  7358,6365,3135,9903,3055,3219,3955,7313,6206,1631,

  5869,5893,4569,1251,2542,5740,2073,9805,1189,7550,

  4362,6214,5680,8753,8443,3636,4495,9643,3782,5556,

  1018,9729,8588,2797,4321,4714,9658,8997,2080,5912,

  9968,5558,9311,7047,6138,7618,5448,1466,7075,2166,

  4025,3572,9605,1291,6027,2358,1911,2747,7068,1716,

  9661,5849,3210,2554,8604,8010,7947,3685,2945,4224,

  7014,9058,6259,9503,1615,1060,7787,8983,3822,2471,

  5146,7066,1029,1777,7788,2941,3538,2912,3096,7421,

  9175,6099,2930,4685,8465,8633,2628,7155,4307,9535,

  4274,2857,6829,6226,8268,9377,9415,9059,4872,6072,

  #E

  @3 $OUT3.DAT 003

  |160|80|5537.54

  #E  第四套

  ===============================================================================

  試題說明 :

  ===============================================================================

  已知在文件IN.DAT中存有若干個(個數(shù)<200)四位數(shù)字的正整數(shù), 函數(shù)ReadDat( )是讀取這若干個正整數(shù)并存入數(shù)組xx中。請編制函數(shù)CalValue( ), 其功能要求: 1. 求出這文件中共有多少個正整數(shù)totNum; 2. 求這些數(shù)右移1位后, 產(chǎn)生的新數(shù)是偶數(shù)的數(shù)的個數(shù)totCnt, 以及滿足此條件的這些數(shù)(右移前的值)的算術(shù)平均值totPjz, 最后調(diào)用函數(shù)WriteDat()把所求的結(jié)果輸出到文件OUT4.DAT中。

  注意: 部分源程序存放在PROG1.C中。

  請勿改動主函數(shù)main( )、讀數(shù)據(jù)函數(shù)ReadDat()和輸出數(shù)據(jù)

  函數(shù)WriteDat()的內(nèi)容。

  ===============================================================================

  程序 :

  ===============================================================================

  #include

  #include

  #define MAXNUM 200

  int xx[MAXNUM] ;

  int totNum = 0 ; /* 文件IN.DAT中共有多少個正整數(shù) */

  int totCnt = 0 ; /* 符合條件的正整數(shù)的個數(shù) */

  double totPjz = 0.0 ; /* 平均值 */

  int ReadDat(void) ;

  void WriteDat(void) ;

  void CalValue(void)

  {

  }

  void main()

  {

  clrscr() ;

  if(ReadDat()) {

  printf("數(shù)據(jù)文件IN.DAT不能打開!07n") ;

  return ;

  }

  CalValue() ;

  printf("文件IN.DAT中共有正整數(shù)=%d個n", totNum) ;

  printf("符合條件的正整數(shù)的個數(shù)=%d個n", totCnt) ;

  printf("平均值=%.2lfn", totPjz) ;

  WriteDat() ;

  }

  int ReadDat(void)

  {

  FILE *fp ;

  int i = 0 ;

  if((fp = fopen("in.dat", "r")) == NULL) return 1 ;

  while(!feof(fp)) {

  fscanf(fp, "%d,", &xx[i++]) ;

  }

  fclose(fp) ;

  return 0 ;

  }

  void WriteDat(void)

  {

  FILE *fp ;

  fp = fopen("OUT4.DAT", "w") ;

  fprintf(fp, "%dn%dn%.2lfn", totNum, totCnt, totPjz) ;

  fclose(fp) ;

  }

  ===============================================================================

  所需數(shù)據(jù) :

  ===============================================================================

  @2 IN.DAT 016

  6045,6192,1885,3580,8544,6826,5493,8415,3132,5841,

  6561,3173,9157,2895,2851,6082,5510,9610,5398,5273,

  3438,1800,6364,6892,9591,3120,8813,2106,5505,1085,

  5835,7295,6131,9405,6756,2413,6274,9262,5728,2650,

  6266,5285,7703,1353,1510,2350,4325,4392,7573,8204,

  7358,6365,3135,9903,3055,3219,3955,7313,6206,1631,

  5869,5893,4569,1251,2542,5740,2073,9805,1189,7550,

  4362,6214,5680,8753,8443,3636,4495,9643,3782,5556,

  1018,9729,8588,2797,4321,4714,9658,8997,2080,5912,

  9968,5558,9311,7047,6138,7618,5448,1466,7075,2166,

  4025,3572,9605,1291,6027,2358,1911,2747,7068,1716,

  9661,5849,3210,2554,8604,8010,7947,3685,2945,4224,

  7014,9058,6259,9503,1615,1060,7787,8983,3822,2471,

  5146,7066,1029,1777,7788,2941,3538,2912,3096,7421,

  9175,6099,2930,4685,8465,8633,2628,7155,4307,9535,

  4274,2857,6829,6226,8268,9377,9415,9059,4872,6072,

  #E

  @3 $OUT4.DAT 003

  |160|80|5447.93

  #E   第五套

  ===============================================================================

  試題說明 :

  ===============================================================================

  已知在文件IN.DAT中存有若干個(個數(shù)<200)四位數(shù)字的正整數(shù), 函數(shù)ReadDat( )是讀取這若干個正整數(shù)并存入數(shù)組xx中。請編制函數(shù)CalValue( ), 其功能要求: 1. 求出這文件中共有多少個正整數(shù)totNum; 2. 求這些數(shù)中的個位數(shù)位置上的數(shù)字是3、6和9的數(shù)的個數(shù)totCnt, 以及滿足此條件的這些數(shù)的算術(shù)平均值totPjz, 最后調(diào)用函數(shù)WriteDat( )把所求的結(jié)果輸出到文件OUT5.DAT中。

  注意: 部分源程序存放在PROG1.C中。

  請勿改動主函數(shù)main( )、讀數(shù)據(jù)函數(shù)ReadDat()和輸出數(shù)據(jù)

  函數(shù)WriteDat()的內(nèi)容。

  ===============================================================================

  程序 :

  ===============================================================================

  #include

  #include

  #define MAXNUM 200

  int xx[MAXNUM] ;

  int totNum = 0 ; /* 文件IN.DAT中共有多少個正整數(shù) */

  int totCnt = 0 ; /* 符合條件的正整數(shù)的個數(shù) */

  double totPjz = 0.0 ; /* 平均值 */

  int ReadDat(void) ;

  void WriteDat(void) ;

  void CalValue(void)

  {

  }

  void main()

  {

  clrscr() ;

  if(ReadDat()) {

  printf("數(shù)據(jù)文件IN.DAT不能打開!07n") ;

  return ;

  }

  CalValue() ;

  printf("文件IN.DAT中共有正整數(shù)=%d個n", totNum) ;

  printf("符合條件的正整數(shù)的個數(shù)=%d個n", totCnt) ;

  printf("平均值=%.2lfn", totPjz) ;

  WriteDat() ;

  }

  int ReadDat(void)

  {

  FILE *fp ;

  int i = 0 ;

  if((fp = fopen("in.dat", "r")) == NULL) return 1 ;

  while(!feof(fp)) {

  fscanf(fp, "%d,", &xx[i++]) ;

  }

  fclose(fp) ;

  return 0 ;

  }

  void WriteDat(void)

  {

  FILE *fp ;

  fp = fopen("OUT5.DAT", "w") ;

  fprintf(fp, "%dn%dn%.2lfn", totNum, totCnt, totPjz) ;

  fclose(fp) ;

  }

  ===============================================================================

  所需數(shù)據(jù) :

  ===============================================================================

  @2 IN.DAT 016

  6045,6192,1885,3580,8544,6826,5493,8415,3132,5841,

  6561,3173,9157,2895,2851,6082,5510,9610,5398,5273,

  3438,1800,6364,6892,9591,3120,8813,2106,5505,1085,

  5835,7295,6131,9405,6756,2413,6274,9262,5728,2650,

  6266,5285,7703,1353,1510,2350,4325,4392,7573,8204,

  7358,6365,3135,9903,3055,3219,3955,7313,6206,1631,

  5869,5893,4569,1251,2542,5740,2073,9805,1189,7550,

  4362,6214,5680,8753,8443,3636,4495,9643,3782,5556,

  1018,9729,8588,2797,4321,4714,9658,8997,2080,5912,

  9968,5558,9311,7047,6138,7618,5448,1466,7075,2166,

  4025,3572,9605,1291,6027,2358,1911,2747,7068,1716,

  9661,5849,3210,2554,8604,8010,7947,3685,2945,4224,

  7014,9058,6259,9503,1615,1060,7787,8983,3822,2471,

  5146,7066,1029,1777,7788,2941,3538,2912,3096,7421,

  9175,6099,2930,4685,8465,8633,2628,7155,4307,9535,

  4274,2857,6829,6226,8268,9377,9415,9059,4872,6072,

  #E

  @3 $OUT5.DAT 003

  |160|43|5694.58

  #E

【計算機等級考試四級上機編程試題及答案】相關(guān)文章:

2017計算機等級考試四級上機編程題練習10-13

全國計算機等級考試四級上機編程題07-11

全國計算機等級考試四級上機編程題型09-15

2016年全國計算機等級考試四級上機編程題型07-08

全國計算機等級考試四級上機編程題訓練201709-08

計算機等級四級考試題及答案10-19

2016年全國計算機等級考試四級上機編程題型匯總09-16

計算機四級上機試題帶答案07-06

計算機四級的上機試題帶答案10-25

主站蜘蛛池模板: 北流市| 庆城县| 永福县| 鄂托克旗| 麻城市| 正阳县| 齐齐哈尔市| 威远县| 南宫市| 广元市| 常德市| 安泽县| 平昌县| 辽宁省| 盐津县| 铁岭县| 涪陵区| 扎兰屯市| 六安市| 临沧市| 莲花县| 牟定县| 伊吾县| 麻江县| 隆尧县| 西城区| 苍南县| 荆州市| 镇雄县| 图片| 盘山县| 敖汉旗| 灵宝市| 罗江县| 华阴市| 晋州市| 山丹县| 台北县| 清河县| 三原县| 博白县|