//tries[i] = attempts; <--- You need to save the guess, Nam.