Billy
unread,Mar 4, 2009, 2:43:15 AM3/4/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 南京大学OPEN技术论坛
#include "stdio.h"
void main()
{int a[40]; /*array to save */
int i,j,N;
int p; /* to save adding*/
int sum;
printf("Please enter the Number: ");
scanf("%d",&N);
for (i=0;i<40;i++)
a[i]=0;
a[0]=1;
p=0;
for (i=1;i<=N;i++)
for(j=0;j<=40;j++)
{sum=a[j]*i+p;
a[j]=sum%10;
p=sum/10;
}
printf("The answer is: %d!=",N);
for(i=0;i<40;i++)
printf("%d",a[i]);
}
不知道哪里出错了,还没有调试的,因为不会搞eclipse。各位大侠帮下忙吧?多谢了。