import java.util.Random;
public class Coffee{
public static void main(String arg[]) {
System.out.println(average(43, 56, 76, 8, 65, 76, 2, 31));
}
public static int average(int...numbers) {
int total = 0;
for(int x:numbers)
total+=x;
return total/numbers.length;
}
}
Comments
Post a Comment