为什么我的程序每次运行结果不一样?
第一次运行结果:
2.00000
3.00000
4.00000
3.00000
2.00000
3.00000
0.000000e+00
第二次运行结果:
n=4, sum=0.038591
n=6, sum=0.038520
Floating point error: Overflow.
Null pointer assignment
第三次运行结果:
n=0, sum=4.230009
n=2, sum=3.409677
n=3, sum=2.877831
n=4, sum=1.355575
n=5, sum=0.247645
n=6, sum=0.007091
n=7, sum=0.000007
n=7, sum= 7.184991e-06
0.99052
2.02575
2.98866
2.01454
0.99798
2.00074
Floating point error: Overflow.
Null pointer assignment
第四次运行结果:
n=0, sum=4.230009
n=2, sum=3.409677
n=3, sum=2.877831
n=4, sum=1.355575
n=5, sum=0.247645
n=6, sum=0.007091
n=7, sum=0.000007
n=7, sum= 7.184991e-06
2.828048e-07
Null pointer assignment
第五次运行结果:
2.00000
3.00000
4.00000
3.00000
2.00000
3.00000
3.323183e+01
第六次以后:
n=0, sum=4.220860
n=1, sum=3.372504
Floating point error: Overflow.
Null pointer assignment
怎么回事?请高手指点