题解列表

筛选

新手一看就会的代码——找出最长的字符串来

解题思路:输入多个字符串用gets,长度用strlen,找出五个数中的最大值容易,怎么把对应的字符串输出呢?还是得用数组,所以用一个二维数组。注意事项:注意max要存起来,不然下次max不变。参考代码:#include#includeintmain(){chars

1032: [编程入门]自定义函数之字符串连接

摘要:解题思路:    创建并输入两个字符串,再创建一个字符数组。先将一个字符串内的元素依次放入数组中,再将另一个字符串的元素也依次放入即可。注意事项:    字符数组的末尾要添上'\0',……

2851: 合法C标识符

摘要:#include<stdio.h> #include<math.h> #include<string.h> # define N 100001 int main() {     c……

2850: 输出亲朋字符串

摘要:#include<stdio.h> #include<math.h> #include<string.h> # define N 100001 int main() {     char ……

2849: 石头剪子布

摘要:#include<stdio.h> #include<math.h> #include<string.h> # define N 100001 int main() {     i……

2848: 基因相关性

摘要:#include<stdio.h> #include<math.h> #include<string.h> # define N 100001 int main() {     c……