An exam has 30 questions. The professor subtracts 8 points for each incorrect answer and adds 7 for each correct answer. If a student ends up receiving 0 points, how many questions were answered correctly?