數(shù)組輸入出什莫問題了
package helloworld;
import java.util.Arrays;
import java.util.Scanner;
public class helloworld {
?public static void main(String[] args){
??//int[] scores={89,56,54,52,-53,56, 98 };
??Scanner input=new Scanner(System.in);
??int[]scores=new int[6];
??for(int i=5;i>0;i--){
???
??? scores[i]=input.nextInt();
??helloworld hello=new helloworld();
??hello.show(scores);}
?}
?public void show(int[] scores){
??Arrays.sort(scores);
??System.out.println(scores[3]);
??System.out.println(scores[5]);
??System.out.println(scores[4]);
?}
?}
2017-08-03
7個數(shù)組啊,你寫6個?