题解列表

筛选

2005: 去除空格

摘要:解题思路:数组元素左移注意事项:参考代码:#include <stdio.h> #define LEN 1000 int main(){ char str[LEN]={&#39;\0&#39;……

2003: 统计字符个数

摘要:解题思路:注意事项:题目交代一串字符,逐个输入,别用gets()参考代码:#include <stdio.h> int main() { char str[11]={&#39;\0&#39;};……

2006: 寻找奇整数

摘要:解题思路:注意事项:符合其中一个条件就break参考代码:#include <stdio.h> #define LEN 15 int main() { int exist=1,num,arr[……

1986: 鸡兔同笼

摘要:解题思路:注意事项:参考代码:#include <stdio.h> int main() { int total; scanf("%d",&total); if(total>=20&&t……

双向循环链表

摘要:#include <bits/stdc++.h> using namespace std; typedef struct Node{ int data; Node *prev,*next; ……

1999: 回文判断

摘要:解题思路:str[i]==str[len-1-i] 恒成立就是回文数注意事项:初始化字符串str、累加数len、判断标记isPal参考代码:#include <stdio.h> int main()……

1989: 奇数个数

摘要:解题思路:入门题一般定义一个长数组即可。比较字符数字-‘0’的ASCII码值注意事项:参考代码:#include <stdio.h> int main(){ char str[1000]; ……