You aren't even using your array.
The num variable is being used in an uninitialized state.
Your loop merely prints 300 copies of the same number
There's nothing in there to decide if a number is...