- 论坛徽章:
- 0
|
#include
#include
#include
const int N=1000;
int compute(unsigned int *s,int n)//s用来存储一次的计算结果,n为本次计算的乘数,函数返回结果中有效数据的节数
{
unsigned long p; //暂时存放一节的结果
unsigned long more=0;//一次乘法的进位
int i; //循环变量
static int m=1;//存放结果中的节数,三位一节
static int q=0;//存放结果中最后为零的节数
//计算本次的结果
for(i=q;i
void main()
{
unsigned int *s; //存放结果
int i; //循环变量
int m; //存放节数
int n; //求n的阶乘
cout:";
cin>>n;
if(n
for(i=2;i
while(s[m]==0) m--;//过滤掉前面的零
//输出结果
cout=0;i--)
{
num++;
cout
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/30708/showart_406377.html |
|