奇怪??
# include <stdio.h>int main(void)
{
int n = 100;
int sum = 1;
for ( int i = 1; i <= n; ++i)
sum = sum * i;
printf("%d\n",sum);
return 0;
}为什么输出是0?? #include <stdio.h>
int main(void)
{
int n = 100;
double sum = 1;
int i;
for( i=1; i <= n; ++i )
{
sum = sum * i;
}
printf("%lf\n",sum);
return 0;
}数据太大,小小整形存放不下~~~
页:
[1]