菜鸟新手 问题求解答 谢谢 关于register
#include<stdio.h>void main()
{
long fac(long);
long i,n;
scanf("%ld",&n);
for(i = 1;i <= n;i++ )
printf("%ld != %d",i,fac(i));
}
long fac(long n)
{
register long i,f=1;
for (i = 1;i <= n;i++)
f = f * i;
return(f)
}
这是一个1到n的阶乘
register long i,f=1;
for (i = 1;i <= n;i++)
f = f * i;
是怎么理解的呢??
谢谢解答一下