Use array to count the right answer

run time error