what is the 2nd requirement ?
package com.codegym.task.task05.task0507;
/*
Arithmetic mean
*/
import java.util.Arrays;
import java.util.Scanner;
public class Solution {
public static void main(String[] args) throws Exception
{
Scanner sc = new Scanner(System.in);
int i=0;
float sum=0;
int a[] = new int[20];
a[i]=sc.nextInt();
while(a[i]!=-1)
{
sum = sum + a[i];
i++;
a[i]= sc.nextInt();
}
float mean = sum/i++;
System.out.println(mean);
}
}