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;
}
答案 0 :(得分:2)
for (int i= 0; i>= A.length; i++);{
Do you see this extra ";" ? ^
将其删除。
除此之外double SVrednost = suma/A.length;
应该在括号之外......