Need Java array help using scanner class to output an average and sort method

后端 未结 4 2184
一整个雨季
一整个雨季 2020-12-04 03:35

After several hours, I haven\'t made progress on making a method to output the average. I also need to make a sort class. Overall, the assignment needs.

Develop meth

4条回答
  •  感情败类
    2020-12-04 04:20

    int sum = 0;
    for (int d : arg ) sum += d;
    double average = 1.0d * sum / arg .length;
    

    this will help you to find average...

提交回复
热议问题