diff --git "a/\346\225\260\347\273\204\347\273\203\344\271\240/\346\235\216\345\230\211\345\237\216/L01.java" "b/\346\225\260\347\273\204\347\273\203\344\271\240/\346\235\216\345\230\211\345\237\216/L01.java" new file mode 100644 index 0000000000000000000000000000000000000000..167ab416178e7a441b38172bfeda1492cc765294 --- /dev/null +++ "b/\346\225\260\347\273\204\347\273\203\344\271\240/\346\235\216\345\230\211\345\237\216/L01.java" @@ -0,0 +1,28 @@ +package com.ljc; + +import java.util.Arrays; +import java.util.Scanner; + +public class L01 { + + public static void main(String[] args) { + // TODO Auto-generated method stub + Scanner scanner = new Scanner (System.in); + int max = 0; + int min = 0; + int sum = 0; + int a[] = new int [6]; + for (int i = 1; i < 6; i++) { + System.out.println("请输入第"+i+"个的评委评分"); + a[i]=scanner.nextInt(); + if (a[i]<0 || a[i]>100) { + System.out.println("输入有误,请重新输入"); + }else { + + Arrays.sort(a); + sum = a[1]+a[2]+a[3]+a[4]; + System.out.println("去掉一个最高分去掉一个最低分得分为" + sum ); + } + } + } +}