liang183 发表于 2017-3-14 12:24:35

C programming a modern approach_课后答案

Answers to Selected Exercises
2. (a) The program contains one directive (#include) and four statements (three calls of printf and one return). (b)
Parkinson's Law:
Work expands so as to fill the time available for its completion. 3.
#include <stdio.h>
int main(void) {
int height = 8, length = 12, width = 10, volume;
volume = height * length * width;
printf("Dimensions: %dx%dx%d\n", length, width, height);   printf("Volume (cubic inches): %d\n", volume);
printf("Dimensional weight (pounds): %d\n", (volume + 165) / 166);
return 0; }
4. Here's one possible program: #include <stdio.h>
int main(void) {
int i, j, k;   float x, y, z;
printf("Value of i: %d\n", i);   printf("Value of j: %d\n", j);   printf("Value of k: %d\n", k);
printf("Value of x: %g\n", x);   printf("Value of y: %g\n", y);

完整课后答案请下载附件,回复本帖子即可查看解压密码

**** Hidden Message *****

**** Hidden Message *****

tt503177177 发表于 2018-1-2 20:07:17

3QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ

331442343 发表于 2020-10-28 09:25:25

3QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
页: [1]
查看完整版本: C programming a modern approach_课后答案