所以我有这个作业分配,要求我在比较两个数组后将输出分配给标签。我的问题是比较两个数组后,分配的输出是错误的。如果在两个数组的特定索引处相等,我应该输出“ Y”,如果它们不相等,则应该输出“ N”,但是每次我运行代码时,无论什么,它都会向所有标签输出“ Y” 。比较后如何解决输出的内容?
private void evaluateStudentAnswers()
{
/* Use a "for" loop to cycle through the answerKey[] and studentAnswers[] arrays, and compare the answers
* in the two arrays at each index. If they match, then increment the global variable "correctAnswers"
* and assign the value 'Y' to the corresponding index in the correctOrIncorrect[] array. if they
* don't match, then increment the global variable "incorrectAnswers" and assign the value 'N' to the
* corresponding indes in the …Run Code Online (Sandbox Code Playgroud)