Random numbers are not guranteed to be unique. A simple way would be to keep generating random numbers until a number is generated that is not present in the existing array.
Hmmm....well, numbers should not be repeated (both lotto and input numbers). I don't know how to validate numbers so it would give an error if I input the same number twice.
I think I'm good with the srand function since it's working fine. Next problem is how to validate the numbers so it won't repeat itself for the lotto numbers and for the user input, it should give an error if you input a number twice.