Int main ()
{
Jc int I, j, sum, n.
Sum=1;
The scanf (" % d ", & amp; N);
for(i=1; i<=n; I++)
{
Sum=sum * I;
}
printf("%d\n",sum);
return 0;
}
Q: why do input the result is 0 100?
CodePudding user response:
Save the children, it's too hard toCodePudding user response:
#includeInt main ()
{
Jc int I, j, sum, n.
sum=0;
The scanf (" % d ", & amp; N);
for(i=1; i<=n; I++)
{
Jc=1;
For (j=1; J<=n; J++)
{
Jc=jc * j;
}
Sum=sum + jc.
}
printf("%d\n",sum);
return 0;
}
CodePudding user response:
What's the difference between the two methods? Why the result is not the sameCodePudding user response:
100!=9.3326215443944152681699238856267 e+157Don't say int the long was
CodePudding user response:
Before a factorial, followed by factorial and