1 习题参考答案
1. (略)
2 判断题
c语言程序设计教材答案
1
2
3
4
5
×
×
3 填空题
(1) main
(2) 函数的首部、函数体
(3) {}
(4) mainmain
(5) 语句、分号(;
4 选择题
1
2
3
4
5
C
C
C
A
B
5 选择题
(1)
#include <stdio.h>
main()
{
  int a, b, s,t;
  printf("Enter  A,B=?\n");
  scanf("%d%d", &a, &b);
  s=a+b;
  t=a*b;
  printf("s=%d, t=%d\n", s, t);
}
(2)
#include <stdio.h>
main()
{
  printf("=================\n");
printf("  Hello! \n");
  printf("  How do you do \n");
  printf("=================\n");
}
3
#include <stdio.h>
main()
{
  int r, h;
  float v;
printf("Enter  R, H=?\n");
  scanf("%d%d", &r, &h);
  v=3.1415926*r*r*h;
  printf("v=%f\n",v);
}