//msc自己写的答案,Ans正确答案 for (int i = 0, j = 0; i < Ans.Length ; i++, j++) { if (Ans[i] == msc[j])//如果两个答案相同,则正确答案数加一个 score ++; else continue; }