на меня компутер ругается
package com.javarush.task.task05.task0507;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/*
Среднее арифметическое
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader (new InputStreamReader(System.in));
int a [] = { };
int b = 0;
while(true){
int i = 0;
a[i] = Integer.parseInt(reader.readLine());
if (a[i]==-1){
b = b / i;
break;
}
b = b + a[i];
i++;
}
System.out.println(b);
}
}