1 #include <iostream> #include <string> bool Palindrome(const std::string &st); int main() { u…
分类:C Primer Plus 编程练习
C++ Primer Plus [第六版]第5章编程练习题答案
1 #include <iostream> int main() { using namespace std; int num1, num2; cout << "请输入第一个整数: "; cin …
C++ Primer Plus [第六版]第4章编程练习题答案
1 #include <iostream> int main() { using namespace std; char first[20]; char last[10]; char deserve; int…
C Primer Plus [第六版]第17章编程练习题答案
1. 修改程序清单17.2,使其既能以正序又能以逆序显示电影列表。一种方法是修改链表定义以使链表能被双向遍历;另一种方法是使用递归。 //使用结构链表 #include <stdio.h> #include…
C Primer Plus [第六版]第16章编程练习题答案
2 #include <stdio.h> #define VALUE(X,Y) (1/((1/(X)+1/(Y))/2)) int main() { double x,y; puts("请输入 2 个数: "…
C Primer Plus [第六版]第15章编程练习题答案
1 #include <stdio.h> #include <limits.h> #include <string.h> #define SLEN 33 //输入 char *s_ge…
C Primer Plus [第六版]第14章编程练习题答案
1 #include <stdio.h> #include <string.h> int days_s(char *st); struct month { char month_a[20]; ch…
C Primer Plus [第六版]第13章编程练习题答案
1 //使用标准 I/O #include <stdio.h> #include <stdlib.h> //提供 exit() 原型 int main() { int ch; //读取文件时, 储…
C Primer Plus [第六版]第12章编程练习题答案
1 #include <stdio.h> void critic(int *n); int main() { int units; printf("多少磅重的黄油?\n"); scanf_s("%d", &a…
C Primer Plus [第六版]第11章编程练习题答案
1 #include <stdio.h> void strinput(char *st, int n); int main() { char input[20]; strinput(input, 20); p…