参考答案
LeeDZ31
星光不负赶路人
展开
-
C primer plus 第六版 第七章 参考答案
本答案仅供参考,尚有不足,欢迎指正交流//7.12.1//7.12.1编写一个程序读取输入 # include <stdio.h># include <ctype.h># define STOP '#'int main(void){ int i, space, bh; char ch; i = space = bh = 0; printf("Please enter the what you want(# to quit)\n"); while原创 2022-01-10 20:27:54 · 531 阅读 · 0 评论 -
C primer plus 第六版第六章答案
现附上第六章答案,由于嵌套引用较繁琐,故瑕疵较多,欢迎指正交流//6.16.1//6.16.1储存26个小写字母 # include <stdio.h>int main(void){ int i; int k; char ch[26]; for (i = 0,k = 1; i < 26;) { printf("enter the %d character\n", k++); scanf("%c", &ch[i++]); getchar(.原创 2021-07-23 23:04:44 · 371 阅读 · 0 评论 -
C primer plus 第六版第五章答案
现附上我对第五章习题的解答,如有创新,欢迎交流//5.11.1//5.11.1将分钟数转化为小时和分钟 # include <stdio.h># define H_PER_MIN 60int main(void){ int hours; int minutes; int last; printf("Please enter the minutes:\n"); scanf("%d", &minutes); while (minutes > .原创 2021-07-19 23:06:23 · 176 阅读 · 0 评论 -
C primer plus 第六版第四章答案
现附上我对第四章习题的解答,仅供参考,欢迎交流//4.8.1//4.8.1运用数组输出你的名和姓 # include <stdio.h>int main(void) { char first_name[40];//定义名 char last_name[20]; //定义姓 printf("Please enter your first_name\n"); scanf("%s", first_name); //字符串不必加取地址符 printf("Ok,%s.原创 2021-07-18 16:37:09 · 269 阅读 · 1 评论 -
C primer plus 第六版第三章答案
现附上我对第三章的习题的解答,仅供参考,欢迎交流//3.11.2//输入一个ascll码值,打印出对应的字符 # include <stdio.h>int main(void){ int i; printf("Please enter a ascll number\n"); scanf("%d", &i); printf("The output character is %c", i); return 0; } //3.11.3//打.原创 2021-07-18 10:29:14 · 131 阅读 · 0 评论 -
C primer plus 第六版第二章答案
现附上我对第二章习题的解答,仅供参考,欢迎交流//2.12.1//2.12.1打印特定内容# include <stdio.h>//引用printfint main(void) { printf("Gustav Mahler\n"); printf("Gustav\nMahler\n"); printf("Gustav Mahler"); return 0;}//2.12.3//2.12.3将你的年龄转换成天数 # include <s.原创 2021-07-17 22:39:41 · 95 阅读 · 2 评论