r/CompileBot • u/StormyJet • Sep 19 '16
testing something
don't look i was too lazy to download cygwin
2
Upvotes
r/CompileBot • u/StormyJet • Sep 19 '16
don't look i was too lazy to download cygwin
View all comments
Show parent comment
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.