#C++1208——孤独的骑士(递归) 摘要:解题思路: 用递归遍历骑士所有可能的情况;注意事项: 国际象棋64个格子,8行8列分布(哈哈,自行脑补),注意递归终止条件 ; 参考代码:#include <iostream> #includ…… 题解列表 2022年08月03日 0 点赞 0 评论 362 浏览 评分:0.0
题解 1023: [编程入门]选择排序(C) 摘要:出现问题:1.输入a直接printf时,窗口显示为一串方框(因为输入和输出的数据类型不一致)2.k = a[0];语句执行后,打印出的k值不是a[0](因为k与a的数据类型不一致)3.只有b[0]是正…… 题解列表 2022年08月04日 0 点赞 0 评论 334 浏览 评分:0.0
数字的处理与判断 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<math.h>//因为要用到pow(a,b) using namespace std; int main(…… 题解列表 2022年08月04日 0 点赞 0 评论 275 浏览 评分:0.0
#C++1227——日期排序(结构体,sort) 摘要:参考代码:#include<iostream> #include <algorithm> #include <iomanip> using namespace std; typedef str…… 题解列表 2022年08月04日 0 点赞 0 评论 636 浏览 评分:9.9
[编程入门]自定义函数处理最大公约数与最小公倍数(c++版) 摘要:参考代码:#include<iostream>using namespace std;int zd(int a,int b){ int r; while(r=a%b) { …… 题解列表 2022年08月04日 0 点赞 0 评论 520 浏览 评分:9.9
数列极差(C++) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std;int cmp(int a,int b){ retur…… 题解列表 2022年08月04日 0 点赞 0 评论 853 浏览 评分:7.0
C# 编写题解 1227: 日期排序(setw setfill) 摘要:```cpp #include using namespace std; int a,b,c,e,num[1005]; char d; int main() { while(cin>>…… 题解列表 2022年08月04日 0 点赞 0 评论 471 浏览 评分:9.0
[编程入门]自定义函数求一元二次方程 摘要:参考代码:#include<iostream>#include<iomanip>#include<cmath>using namespace std;double x1,x2,a,b,c,z;void…… 题解列表 2022年08月04日 0 点赞 0 评论 458 浏览 评分:9.9
优质题解 排序算法总结之简单选择排序 摘要:解题思路: ① i用于记录要排序的数 ②k用于记录该趟最小的数,j用于记录寻找最小的数遍历位置。 当a[k]>a[j],即k=j, …… 题解列表 2022年08月04日 1 点赞 2 评论 3432 浏览 评分:8.4
[编程入门]自定义函数处理素数 摘要:注意事项:本题很容易超时,用cmath库里的sqrt函数来求循环终止数可以避免超时以下为c++代码参考代码:#include<iostream>#include<cmath>using namespa…… 题解列表 2022年08月04日 0 点赞 0 评论 375 浏览 评分:9.9