课后:数组这一章说难不难,说简单不简单,知识点有点多,需要慢慢消化,很多东西都理解,但是看到题目后不是很懂哪个意思,明白之后一点就通,主要还是需要多练习,数组的表示法和指针表示法方法有点多。 1 //计算每年的总降水量、…
分类:C Primer Plus 编程练习
C Primer Plus [第六版]第9章编程练习题答案
1 #include <stdio.h> double min(double x, double y); int main() { double a, b, c; printf("请输入2个浮点数: "); …
C Primer Plus [第六版]第8章编程练习题答案
1 #include <stdio.h> int main() { int n; char ch; n = 0; while ((ch = getchar()) != EOF) { n++; } printf…
C Primer Plus [第六版]第7章编程练习题答案
1 #include <stdio.h> int main() { char ch; int a, b, c; a = 0; b = 0; c = 0; printf("请输入内容[#退出]: "); whi…
C Primer Plus [第六版]第6章编程练习题答案
1 /* 编写一个程序,创建一个包含26个元素的数组,并在其中储存26个小写字母。 然后打印数组的所有内容 */ #include <stdio.h> #define SIZE 26 int main() {…
C Primer Plus [第六版]第4章编程练习题答案
2 #include <stdio.h> int main(void) { char name[40]; printf("请输入你的姓名: "); scanf("%s", name); prin…
C Primer Plus [第六版]第5章编程练习题答案
1 #include <stdio.h> const int SHI = 60; int main() { int m, mm, s; printf("分钟转换为小时分钟的程序\n"); printf("请输…