题解 | #公务员面试#

公务员面试

http://www.nowcoder.com/practice/f3a134908d5b41869f14f58307008a97

import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] score=new int[7];
        while(sc.hasNext())
        {
            for(int i=0;i<7;i++)
            {
                score[i]=sc.nextInt();
            }
            Arrays.sort(score);
            double average=(score[1]+score[2]+score[3]+score[4]+score[5])/5.0;
            System.out.printf("%.2f\n",average);
        }
    }
}

全部评论

相关推荐

点赞 评论 收藏
分享
07-14 13:37
重庆大学 C++
点赞 评论 收藏
分享
07-07 12:25
门头沟学院 Java
程序员牛肉:你这个智邮公司做的就是那个乐山市税务系统的服务吗?
点赞 评论 收藏
分享
程序员小白条:这比例牛逼,750:1
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
07-11 11:25
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务