![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
学习
jakey886
通天文 识地理 知阴阳 晓奇门 观阵图 掌兵势
展开
-
算平方根 (方法)
public static double sqr(double square) { double x0, x1; double k = 0.0000001;// 精度 x0 = 0.3 * square; x1 = 0.5 * (x0 + square / x0); while (x0 - x1 > k) { x0 = x1; x1 = 0.5 * (x0 + square / x0); } return (x0 + x1) / 2; }原创 2010-06-15 11:43:00 · 398 阅读 · 0 评论 -
扑克牌 洗牌算法
public class Cards { static int cards[] = new int[52]; static int used; static void newCards() { for (int i = 0; i cards[i] = i + 1; } } /** * 显示所有扑克牌 */ static void showAllCards() { int count = 1; for (int i = 0; i showCard(cards[i]); if (co原创 2010-06-15 11:40:00 · 700 阅读 · 0 评论