添加收藏
 系统管理
 联系方式
  汉南在线考试认证计算机二级

第一至三章答案 高等教育出版社《全国计算机等级考试二级教程--C语言程序设计》课后答案
作  者:汉南居士
关键字:C语言基础



第一章

1.1 .exe

1.2 .c .obj .exe

1.3 顺序、选择、循环

第二章

一、选择题

2.1   B

2.2   D

2.3 B

2.4   A

2.5   C

2.6   A

2.7   B

2.8   A

2.9   D

2.10 D

2.11 B

2.12 B

2.13 A

二、填空题

2.14 12 12

2.15 4.2 4.2

2.16 { } 声明

2.17 关键字 用户标识

2.18 int float double

2.19 float a1=1,a2=1;

2.20 存储单元

2.21 3.5

2.22 a*b/c (a*b)/c a*(b/c)

2.23 10赋值给s赋值

2.24 0,1

2.25 8 255 11111111 0 00000000

2.26 32767 -32768 0111111111111111 1000000000000000

2.27 10 8 16

三、上机改错

2.28

#include "stdio.h"

main(){/* main function */

       float r,s; /*/*r is radius */,/*s is area of circular*/*/

       r=5.0;

       s=3.14159*r*r;

       printf("%f\n",s);

}

2.29

#include "stdio.h"

main(){/* main function */

       float a,b,c,v; /*a,b,c are sides, vi is volume of cube */

       a=2.0;b=3.0;c=4.0;

       v=a*b*c;

       printf("%f\n",v);

}

第三章
3.1  c
3.2  c
3.3  d
3.4  c
3.5  d
3.6  b
3.7  c
3.8  d
3.9  a
3.10 b
3.11 c
3.12 a
3.13 b
3.14 c
3.15 c
3.16 a
3.17 a
3.18 c
3.19 a
3.20 b
3.21 (1)-2002500(2)i=-200, j=2500
     (3)i=-200
        j=2500
3.22 12 0 0
3.23 一句语句 ;
3.24 ;
3.25 100 25.81 1.89234
     100    25.81    1.89234
     100
     25.381
     1.89234
3.26 x=127,x=   127,x=   177,x=  7f,x=%6u
3.27 x=127,x=127   ,x=$127   ,x=$000127,x=%06d
3.28 a=513.7892,a=  513.78,a=  513.78921500,a=  513.78921500
3.29
main (){
double a,b,c,s,v;
printf("input a,b,c:");
scanf("%lf%lf%lf",&a,&b,&c);
s=a*b;
v=a*b*c;
printf("a=%f,b=%f,c=%f",a,b,c);
printf("s=%f,v=%f\n",s,v);
}
3.30
void main(){
  printf("560mins=%dhour%dmins",560/60,560%60);
  exit(0);
}
3.31
void main(){
    int m,n;
    scanf("%d%d",&m,&n);
    printf("%d,%d\n",m/n,m%n);
    exit(0);
}
3.32
void main(){
  double m,n,i;
  scanf("%lf%lf%lf",&m,&n,&i);
  printf("%.1f",(m+n+i)/3);
}
3.33
void main(){
  int a,b,c;
  scanf("%d%d%d",&a,&b,&c);
  a=a+b+c;
  b=a-b-c;
  c=a-b-c;
  a=a-b-c;
  printf("%d%d%d",a,b,c);
  exit(0);
}



来源:互联网
阅读:1150
日期:2006-3-3

【 双击滚屏 】 【 推荐朋友 】 【 收藏 】 【 打印 】 【 关闭 】 【 字体: 】 
上一篇:NCRE三级网络技术考试重点内容分析
下一篇:等级考试教材第十四章编程题目答案

  >> 相关文章
 
  ·第四章答案 高等教育出版社《全国计算机等级考试二级教程--C语言程序设计》课后答案

5.12汶川大地震遇难同胞默哀 | 汉南在线总站 | 网站建设 | BT电影下载 | 汉南在线博客 | 流行购商城

授权使用:汉南在线 http://hnzx.hzwz.net/
经营许可证:陕ICP备05000109号 Powered by:汉南在线  
Copyright (c) 2002-2008 汉南在线. All Rights Reserved .