You've made no mention of the language you are coding in, so its hard to help you out with examples.
What have you tried so far?
It's odd that you feel you need to
cast it into an integer when you can just create a random integer.
Please show the code you've created thus far in creating a random value.
Of course a quick google search does wonders. I have no idea what language you are doing this in since you didn't mention it, so one such search on google could include "C# random number" and get you lots of
hits .
This might help you formulate questions that will get you more help.
please visit the
Posting Guidelines