Home > Back-end >  Why not enter 100 results?
Why not enter 100 results?

Time:01-06

#include
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 to

CodePudding user response:

#include
Int 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 same

CodePudding user response:

100!=9.3326215443944152681699238856267 e+157
Don't say int the long was

CodePudding user response:

Before a factorial, followed by factorial and
  • Related