public class Solution {
public static void main(String[] args) throws Exception {
double sum=0;
int count=0;
BufferedReader buff=new BufferedReader(new InputStreamReader(System.in));
String s= buff.readLine();
int a=Integer.parseInt(s);
while(true)
{
if(a==(-1.0))
break;
else
{sum=sum+a;
count+=1;}
}
sum=sum/count;
System.out.println(sum);
//在此编写你的代码
}
}
package zh.codegym.task.task05.task0507;
/*
算术平均值
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
double sum=0;
int count=0;
BufferedReader buff=new BufferedReader(new InputStreamReader(System.in));
String s= buff.readLine();
int a=Integer.parseInt(s);
while(true)
{
if(a==(-1.0))
break;
else
{sum=sum+a;
count+=1;}
}
sum=sum/count;
System.out.println(sum);
//在此编写你的代码
}
}