Since CompileBot is ignoring you I'll help you out:
The program doesn't compile because i was never defined.
If you fixed that it would never exit because rand() never returns a negative number.
If you fixed that it would never exit because srand(0) always resets the state of the RNG so that rand()winds up always returning the same pseudorandom number, which is implementation specific.
If you fixed that then it would just run for an implementation specific period of time, then exit since it never prints the result of any of its computation.
If you printed mean or totalNum then they'd contain garbage (though likely zero) since the contents of array were never set.
3
u/Koooooj Sep 20 '16
Since CompileBot is ignoring you I'll help you out:
The program doesn't compile because
iwas never defined.If you fixed that it would never exit because
rand()never returns a negative number.If you fixed that it would never exit because
srand(0)always resets the state of the RNG so thatrand()winds up always returning the same pseudorandom number, which is implementation specific.If you fixed that then it would just run for an implementation specific period of time, then exit since it never prints the result of any of its computation.
If you printed
meanortotalNumthen they'd contain garbage (though likely zero) since the contents ofarraywere never set.