摘要: 简单的洗牌算法/************************************************************************实现原理:产生随机数,交换数组中的值************************************************************************/#include"stdafx.h"/**********... 阅读全文
posted @ 2010-01-18 19:34 o无尘o 阅读(422) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>#include<stdlib.h>#defineN10//算N的阶乘intmain(){//数组1位1!intary[N]={1,1};inti,j;for(i=2;i<=N;i++){//各个下标的阶乘,第0位下标是位数,所以从第1位开始for(j=1;j<=ary[0];j++){ary[j]=ary[j]*i;}//处理... 阅读全文
posted @ 2010-01-18 14:17 o无尘o 阅读(1937) 评论(0) 推荐(0) 编辑
摘要: #include"stdafx.h"#defineBIT10000/************************************************************************函数功能:大数计算参数1:charszByNum[]//被乘数[0]位为字符长度参数3:charszNum[]//乘数[0]位为字符长度参数5:chararyResult[]//积用来放结... 阅读全文
posted @ 2010-01-18 12:50 o无尘o 阅读(1298) 评论(0) 推荐(0) 编辑
摘要: /************************************************************************9宫格排版,把1..9分别放到9个格子中,不能重复,横竖相加都相等************************************************************************/#include<stdio.h&g... 阅读全文
posted @ 2010-01-18 10:08 o无尘o 阅读(2085) 评论(0) 推荐(1) 编辑