精品文章 经典递归题:汉诺塔(Hanoi)不同角度深入探究(C/C++/Java版) 摘要:经典原型: 汉诺塔(又称河内塔)问题是源于印度一个古老传说的益智玩具。大梵天创造世界的时候做了三根金刚石柱子,在一根柱子上从下往上按照大小顺序摞着64片黄金圆盘。大梵天命令婆罗门把圆盘从…… 文章列表 2020年10月10日 0 点赞 0 评论 945 浏览 评分:9.7
递归小练习:递归输出数组中最大值(Java版) 摘要:题目:用递归的方法求一个数组中的最大元素。思路:用一个变量m存储方法执行过程中的最大值,并不断更新,用一个变量n作为指针不断地枚举数组中的每一位,并与递归边界值和数组[m]对比.示例代码:(仅作参考)…… 文章列表 2020年10月09日 0 点赞 0 评论 699 浏览 评分:6.2
题目 1806: [编程基础]输入输出练习之第二个数字 摘要:#include<iostream>using namespace std;int main(){ int a,b,c; cin>>a>>b>>c; cout<<b<<endl; …… 文章列表 2020年10月08日 0 点赞 0 评论 347 浏览 评分:9.9
题目 1081: Infinite Dictionaries 摘要:#include<vector> #include<map> #include<string>#include<cstring>#include<cstdio>#include<cstdlib>usi…… 文章列表 2020年10月08日 0 点赞 2 评论 288 浏览 评分:9.9
来吧!C++制作的乱斗游戏!(有外挂!但.....没有用!!!) 摘要:```cpp #include #include #include using namespace std; double shanghai[20]={0.6,1.1,2,3.16,5.5,…… 文章列表 2020年10月08日 0 点赞 14 评论 810 浏览 评分:9.9
题目 1065: 二级C语言-最小绝对值 摘要:#include<stdio.h>#include<math.h>int main(){ int num1[10],num2[10]; int i,min,rec,t; for(i=…… 文章列表 2020年10月07日 0 点赞 1 评论 501 浏览 评分:9.9
题目 1155: C语言训练-阶乘和数* 摘要:#include<bits/stdc++.h>using namespace std;int fact(int n);long long int panduan(long int n);int mai…… 文章列表 2020年10月07日 0 点赞 0 评论 588 浏览 评分:9.9
递归算法练习题:正向三角形输出(JAVA版) 摘要:题目:使用递归算法实现如下n行n列个星形字符的正向三角形输出。输出示例:** ** * ** * * ** * * * ** * * * * ** * * * * * *(本示例代码沿用VSCode,…… 文章列表 2020年10月06日 0 点赞 0 评论 1242 浏览 评分:9.9
题目 1143: C语言训练-素数问题 摘要:#include<iostream>using namespace std;int main(){ int n; while(cin>>n) { if(n==0) co…… 文章列表 2020年10月06日 0 点赞 0 评论 284 浏览 评分:9.9
题目 1122: C语言训练-亲密数 摘要:#include <stdio.h> void main() { int i,o,A,B; for (i=2;i<=3000;i++) { …… 文章列表 2020年10月05日 0 点赞 0 评论 380 浏览 评分:9.9