for random numbers check here
http://www.java2s.com/Code/C/Math/Ge...wtouserand.htm