How to use random function? Please Help

nityoday:
What am I doing wrong ?

You added a variable to the program without declaring it. I provided a code snippet to fix your problem. You need to provide the rest. If you want someone else to do all the work, that costs money.