I have tried changing the break clause to "break" and that doesn't complete either.
Help!
package com.codegym.task.task05.task0507;
/*
Arithmetic mean
*/
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
// keep running code until some types exit
Scanner scanner = new Scanner(System.in);
int io = scanner.nextInt();
//int io;
int n = 0;
int total=0;
while(scanner.hasNext()){
if( (Integer)scanner.hasNext() == -1 ){
scanner.close();
}
total = total + io;
n++;
}
System.out.println((double)total/(double)n);
/*while (true)
{
String s = buffer.readLine();
if (s.equals("exit"))
break;
}*/
}
}