自定义函数之字符串连接 摘要:#include<stdio.h> int main(void) { char a[100]; char b[100]; char temp[100]; i…… 题解列表 2024年12月28日 0 点赞 0 评论 431 浏览 评分:0.0
多余的string函数 摘要:解题思路:#include<stdio.h> #include<string.h> int main(void) { char a[100]; gets(a); i…… 题解列表 2024年12月28日 0 点赞 0 评论 394 浏览 评分:0.0
二维数组的转置 摘要:解题思路:#include<stdio.h> int main(void) { int a[3][3] = { {1, 2, 3}, &nbs 题解列表 2024年12月28日 1 点赞 0 评论 564 浏览 评分:0.0
自定义函数处理素数 摘要:#include<stdio.h> int judge(int n); int main(void) { int n; while(scanf("%d", &n)) …… 题解列表 2024年12月28日 2 点赞 0 评论 936 浏览 评分:0.0
佳肴荟萃很快就来一句 摘要:加油了解题思路:注意从后面逐个移动注意事项:参考代码: #include<stdio.h> int main(void) { int a[10]; int i; f…… 题解列表 2024年12月28日 1 点赞 0 评论 478 浏览 评分:0.0
用冒泡排序的方法解决 摘要:解题思路: 通过交换相邻元素的方式将元素依次向前移动一位,实现将数组的后 m 个元素循环前移到数组前面。注意事项: 注意输入的 m 值不能超过数组的长度,否则可能会出现越界错误。代码中使用了变长数组(…… 题解列表 2024年12月28日 2 点赞 0 评论 383 浏览 评分:10.0
2163二分法查找最接近的元素 摘要:解题思路:注意事项:在比较的时候需要注意取绝对值(abs函数)比较,不然会出错。参考代码:#include <bits/stdc++.h>using namespace std;int findClo…… 题解列表 2024年12月28日 0 点赞 0 评论 389 浏览 评分:10.0
1768: 循环入门练习5题解 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n; cin>>n; for(in…… 题解列表 2024年12月28日 0 点赞 0 评论 193 浏览 评分:0.0
1767: 循环入门练习4题解 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int sum=0; int n; cin…… 题解列表 2024年12月28日 0 点赞 0 评论 106 浏览 评分:0.0
1575递归倒置字符c++递归法简单明了解决方案 摘要:解题思路:此处使用swap方法进行字符交换,可以使代码更简洁更简单,只需要在定义的一个方法中传输该字符与字符数组左右的边界。当左边界大于等一有边界就可以返回了,这样也可以使得输入n=1时也能返回。再使…… 题解列表 2024年12月28日 0 点赞 0 评论 448 浏览 评分:10.0