how to slove
package com.codegym.task.task05.task0507;
/*
Arithmetic mean
*/
import java.util.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code her
Scanner ob = new Scanner (System.in);
int c=0,count = 0;
double result =0;
while(true){
int k = ob.nextInt();
c += k;
count++;
result = c/count;
if(k== -1)
break;
}
System.out.println(result);
}
}