无法解析为变量

时间:2014-03-31 13:11:16

标签: variables

int A [] = {-10, 3, 16, 1, 4, -2};
int suma = 0;

for (int i= 0; i>= A.length; i++);{
    suma += A[i]; #Error here: "It cannot be resolved to a variable"
    double SVrednost = suma/A.length;
}

1 个答案:

答案 0 :(得分:2)

for (int i= 0; i>= A.length; i++);{
Do you see this extra ";" ?      ^

将其删除。

除此之外double SVrednost = suma/A.length;应该在括号之外......