Generating random number example

Answer to:
http://stackoverflow.com/questions/16287263/why-does-my-random-generator-always-return-0