若有数组Dim a%(10)且每个元素有值,统计前一个元素大于后一个元素的次数,结果存放在变量n中。则下列语句正确的是___________。
A.
Dim i%, n% For i = 1 To 10 If a(i) > a(i + 1) Then n = n + 1 End If Next MsgBox(n)
B.
Dim i%, n% For i = 1 To 10 If a(i) > a(i + 1) Then n = a(i) End If Next MsgBox(n)
C.
Dim i%, n% For i = 0 To 9 If a(i) > a(i + 1) Then a(i) = n + 1 End If Next MsgBox(n)
D.
Dim i%, n% For i = 0 To 9 If a(i) > a(i + 1) Then n = n +1 End If Next MsgBox(n)