标签:
#include<stdio.h>
main(void)
{
int i=2,n=10;
float fac=1; /*¶¨ÒåfacΪµ¥¾«¶ÈÐÍ£¬²¢¸³³õÖµ1*/
if(n==0||n==1)
{
printf("facorial is 1\n");
return 0;
}
while(i<=n)
{
fac=fac*i;
i++;
}
printf("facorial of %d is :%.f\n",n,fac);
}
标签:
原文地址:http://www.cnblogs.com/flywolf601/p/5865614.html