sort排序,c++ 摘要:解题思路:用sort排序解题注意事项: 注意但m<2时,不能进入for循环判断,会默认为质数参考代码:#include<iostream>#include <algorithm>using names…… 题解列表 2024年01月30日 0 点赞 0 评论 421 浏览 评分:0.0
利用数组求偶数和 摘要:解题思路:使用数组来记录输入的数据,记录完成后再判断是否为偶数并输出偶数和即可注意事项:参考代码:#include<iostream>using namespace std;void dfs(int …… 题解列表 2024年01月30日 0 点赞 0 评论 444 浏览 评分:0.0
for循环求解等差数列 摘要:解题思路:利用for循环求解此题即可注意事项:参考代码:#include<iostream>using namespace std;void dfs(int a){ int b = 2; …… 题解列表 2024年01月30日 0 点赞 0 评论 335 浏览 评分:0.0
for循环求解同因查找 摘要:解题思路:利用for循环遍历范围数利用if判断是否符合条件输出符合条件的数注意事项:每行输出一个参考代码:#include<iostream>using namespace std;int main(…… 题解列表 2024年01月30日 0 点赞 0 评论 392 浏览 评分:0.0
for循环求解计负均正 摘要:解题思路:利用for循环拿到输入的所有数,放到数组中在拿到数的同时进行题目要求的操做,最后输出即可注意事项:参考代码:#include<iostream>using namespace std;int…… 题解列表 2024年01月30日 0 点赞 0 评论 442 浏览 评分:0.0
二级C语言-公约公倍 摘要:解题思路:参考链接:用更相减损术求解最大公约数与最小公倍数-Dotcpp编程社区注意事项:参考代码:#include<iostream>using namespace std;int temp;//定…… 题解列表 2024年01月30日 0 点赞 0 评论 382 浏览 评分:0.0
二级C语言-统计字符 摘要:解题思路:可使用cin.get()拿到带空格的字符或者cin.getline()可使用strlen求出数组长度注意事项:需要包含头文件#include<bits/stdc++.h>参考代码:#incl…… 题解列表 2024年01月30日 0 点赞 0 评论 475 浏览 评分:0.0
数组排序,c++ ,sort 摘要:解题思路:因为要的是排序之后的下标,而且这个下标绑定了排序后对应数字,要求按照未排序前的数组顺序输出排序后的次序(下标+1) 所以使用结构体去绑定数字和下标注意事项:参考…… 题解列表 2024年01月30日 0 点赞 0 评论 558 浏览 评分:0.0
冶炼金属二分法代码 摘要:解题思路:注意事项:参考代码://冶炼金属:二分#include<bits/stdc++.h>#define int long longusing namespace std;const int N …… 题解列表 2024年01月30日 0 点赞 0 评论 350 浏览 评分:0.0
1005温度转换 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ float a,b; scanf("%f",&a); b = 5*(a-32)/9; p…… 题解列表 2024年01月30日 0 点赞 0 评论 459 浏览 评分:0.0