题解列表

筛选

喜欢if的看这里

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#define y(a,b,c) ({ \ double max=(a); \ if((b)>max)max=(b); \ ……

哥德巴赫曾猜测

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int fun(int n) {    if (n == 1) {        return 0;    }    for (int……

字符逆序使用reverse求解

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm> using namespace std;int main(){ string s; getli……

不用递归也能解出这题

摘要://完成一个递归程序,倒置字符数组。并打印实现过程 //递归逻辑为: //当字符长度等于1时,直接返回 //否则,调换首尾两个字符,在递归地倒置字符数组的剩下部分 //输出每一次倒置后的结果,……

建立数组,预设前两项,定义数组构成

摘要:解题思路:建立数组,预设前两项,定义数组的构成。注意事项:输出第k位数,对应的索引是k-1。参考代码:#include<iostream>using namespace std;int main(){……