I need to define two methods for returning the sum
and average
of an int array. The method defining is as follow:-
public int Sum(params int[] customerssalary)
{
// I tried the following but it fails return customerssalary.sum();
}
Another question is, how can I return the average of these int values?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…