Your topic is marked as solved, so you still need help?
I'm assuming the answer is 'yes'.
Please edit your post and make sure your code is [code]between code tags[/code] so that it has line numbers and syntax highlighting, as well as proper indentation.
You should call srand()once at the start of your program, and then never again.
You can't make the array contain random numbers in one line like that - you need to loop through it and manually assign the random number to each index.